Hi all,
Is there a way to put a format rules to group headers? For example, I want the text of these headers turn red when the total PAX is more than 12.
Solved! Go to Solution.
Bravo!
A quick note. The portion CONTEXT("Viewtype") = "table" basically means to apply the format rule to all tables. The one I was suggesting would narrow it down to only THAT specific view.
Glad you were able to figure it out!
Yes.
In the Format Rule you would need to:
If you do not want this Grouping Column to be colored EVERYWHERE in the app, then you would need add to the condition a check for just your Grouping View like this:
AND(
CONTEXT("View") = "Grouping Table View",
SUM(SELECT YourTable[PAX], [GroupingColumn] = [_THISROW].[GroupingColumn])) > 12
)
Hi Willow,
Thank you very much for your help. However, there are some problems with it.
So for grouping, I group my records by Year > Month > Date > and finally the column named "DESTINATION"
When I use the first condition:
SUM(SELECT(TRANSPORATION RECORD[PAX], [DESTINATION] = [_THISROW].[DESTINATION])) > 12
It also applies to some headers even though they are less than 12
Then 2 tried the 2nd one
AND(
CONTEXT("View") = "Grouping Table View",
SUM(SELECT(TRANSPORATION RECORD[PAX], [DESTINATION] = [_THISROW].[DESTINATION])) > 12)
It doesn't work at all:
What I provided was psuedo-expression syntax because I don't know the specific names of all your columns.
IN the SELECT() expression, you need to make sure the selection criteria produces the SAME list of rows shown in your grouping. You probably need to add additional criteria parameters to make that happen. You mentioned your groups are based on year > month > day > DESTINATION, so your SELECT needs to select them this way as well.
In the 2nd expression, you will need to replace "Grouping Table View" with the actual name of YOUR view. Sorry I wasn't very clear on that.
I have figured it out
AND(
CONTEXT("Viewtype") = "table",
SUM(SELECT(TRANSPORATION RECORD[PAX],
AND ([DATE] = [_THISROW].[DATE],
[DESTINATION] = [_THISROW].[DESTINATION]))) > 12)
This work perfectly. Thank you Willow
Bravo!
A quick note. The portion CONTEXT("Viewtype") = "table" basically means to apply the format rule to all tables. The one I was suggesting would narrow it down to only THAT specific view.
Glad you were able to figure it out!
User | Count |
---|---|
15 | |
11 | |
9 | |
8 | |
4 |