Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I am trying to create a pie chart that has a measure applied as a filter:
As you can see in the image, I have applied the "filter" on the pie chart.
The rows where "filter"= 1 also exist in my table (check out the table visual on the left side).
This is the dax used to create the filter measure:
filter =
IF(
[StartDateMeasure] <= SELECTEDVALUE(sample_data[created_at])
&&
[EndDateMeasure] >= SELECTEDVALUE(sample_data[created_at]),
1,
0
)
"startDateMeasure" and "endDateMeasure" are used for the calendar table, their values are shown in the report.
Why is there no data in the pie chart?
Dropbox link for the Power BI report.
Solved! Go to Solution.
Hi @sandeshp
Due to certain security regulations, I am unable to open your link. I restored the data based on your screenshot and here are my testing to help you.
Since I don't know how the two measures in your date table are written, I used a slicer to replace them.
My Date table:
I added a measure to calculate the count.
count = COUNTX(FILTER(sample_data, [filter] = 1), [created_at])
Then put it into the pie chart.
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-xuxinyi-msft Thank you. This is exactly what I needed. But I wonder why we cant use the measure as a filter directly.
I have one more question about the count measure:
count = COUNTX(FILTER(sample_data, [filter] = 1), [created_at])
How do I update this to count only the distinct rows in the table?
Hi @sandeshp
Due to certain security regulations, I am unable to open your link. I restored the data based on your screenshot and here are my testing to help you.
Since I don't know how the two measures in your date table are written, I used a slicer to replace them.
My Date table:
I added a measure to calculate the count.
count = COUNTX(FILTER(sample_data, [filter] = 1), [created_at])
Then put it into the pie chart.
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
86 | |
84 | |
66 | |
62 | |
61 |
User | Count |
---|---|
199 | |
120 | |
110 | |
79 | |
69 |