Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I was able to get a new table created to group children by ages.
and was told to create the following measure
Solved! Go to Solution.
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
Proud to be a Super User!
@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]) )
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
Proud to be a Super User!
@Nathaniel_C which comma. If I use:
If I use:
And if I use this code:
Hi @inglexjc @amitchandak ,
You left an extra & between the first time and the second time.
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]
)
)
Try above.
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
Proud to be a Super User!
So I think the new measure worked, no error but how to do I get the data to show on the graph? The graph right now show blank when I have the Count Measure selected and the Court dates.
So I think the new measure worked, no error but how to do I get the data to show on the graph? The graph right now show blank when I have the Count Measure selected and the Court dates.
Hi @inglexjc ,
I would be glad to help you. However, I was just responding to the syntax in the measure so that it would run. You said it does now. This is a little complicated because you said that you were told to run a certain measure. Since we don't see the original question that you posted, it hard to say what the issue is.
I am work, but will look at this as I can. Two things, check to see if the data is coming in by returning the variables (VAR) and seeing if you are actually getting anything. You can then post the measure to a card.
Count Age Test=
VAR __AgeBandMin =
SELECTEDVALUE ( 'Query1'[Min] )
VAR __AgeBandMax =
SELECTEDVALUE ( 'Query1'[Max] )
Return _AgeBandMin //Then try with the other one.
Next, give us the link to the original question that you posted.
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
Proud to be a Super User!
@Nathaniel_C when I use a card and the measure it comes out blank.
My original question link is here: https://community.powerbi.com/t5/Desktop/Creating-Range-for-Age-Groups/m-p/3017511#M1028489
This is where I was told how to create a table to get the ages grouped and then to create the meausre that wasn't working. And looks like still isn't working. But my end goal is to get a color coded graph based on ages. See picture in my oringal quesiton and the start of this thread.
Legal Files is my pain Table. Caseworker and Query 1 was build from Legal Files. Query 1 is where the Age table and the measure are currently located.
Hi @inglexjc ,
Will look at your original file.
Nathaniel
Proud to be a Super User!
@Nathaniel_C don't worry about it I went a different direction since it wasn't working.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 60 | |
| 44 | |
| 40 | |
| 37 | |
| 21 |
| User | Count |
|---|---|
| 178 | |
| 127 | |
| 116 | |
| 77 | |
| 54 |