Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
sandeshp
Frequent Visitor

No data appearing in PowerBI visual

I am trying to create a pie chart that has a measure applied as a filter:

sandeshp_0-1713177746360.png

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.

1 ACCEPTED SOLUTION
v-xuxinyi-msft
Community Support
Community Support

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:

vxuxinyimsft_0-1713236425106.png

 

I added a measure to calculate the count.

 

count = COUNTX(FILTER(sample_data, [filter] = 1), [created_at])

 

 

Then put it into the pie chart.

vxuxinyimsft_1-1713236547538.png

 

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.

View solution in original post

2 REPLIES 2
sandeshp
Frequent Visitor

@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?

v-xuxinyi-msft
Community Support
Community Support

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:

vxuxinyimsft_0-1713236425106.png

 

I added a measure to calculate the count.

 

count = COUNTX(FILTER(sample_data, [filter] = 1), [created_at])

 

 

Then put it into the pie chart.

vxuxinyimsft_1-1713236547538.png

 

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.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.