Forum Discussion
Color coding graph based on age.
- 3 years ago
Hi inglexjc amitchandak ,
Just replace the comma with && 'Legal Files'[Age] >= __AgeBandMin &&.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel - 3 years ago
Nathaniel_C don't worry about it I went a different direction since it wasn't working.
inglexjc , try like
Count Age =
VAR __AgeBandMin = SELECTEDVALUE('Query1'[Min] )
VAR __AgeBandMax = SELECTEDVALUE('Query1'[Max])
return
CALCULATE(
COUNTX(Filter('Legal Files',
'Legal Files'[Age] >= __AgeBandMin,
'Legal Files'[Age] <= __AgeBandMax
),'Legal Files'[Age]) )
- inglexjc3 years ago
Post Patron
- Nathaniel_C3 years ago
Community Champion
Hi inglexjc amitchandak ,
Just replace the comma with && 'Legal Files'[Age] >= __AgeBandMin &&.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel- inglexjc3 years ago
Post Patron
Nathaniel_C which comma. If I use:
Count Age =VAR __AgeBandMin = SELECTEDVALUE('Query1'[Min] )VAR __AgeBandMax = SELECTEDVALUE('Query1'[Max])returnCALCULATE(COUNTX(Filter('Legal Files' &&'Legal Files'[Age] >= __AgeBandMin,'Legal Files'[Age] <= __AgeBandMax),'Legal Files'[Age]) )I get this error:If I use:
Count Age =VAR __AgeBandMin = SELECTEDVALUE('Query1'[Min] )VAR __AgeBandMax = SELECTEDVALUE('Query1'[Max])returnCALCULATE(COUNTX(Filter('Legal Files'&,'Legal Files'[Age] >= __AgeBandMin &&'Legal Files'[Age] <= __AgeBandMax),'Legal Files'[Age]) )I get this error:And if I use this code:
Count Age =VAR __AgeBandMin = SELECTEDVALUE('Query1'[Min] )VAR __AgeBandMax = SELECTEDVALUE('Query1'[Max])returnCALCULATE(COUNTX(Filter('Legal Files'&,'Legal Files'[Age] >= __AgeBandMin,'Legal Files'[Age] <= __AgeBandMax)&&'Legal Files'[Age]) )I get this error: