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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Cannot get my measure to filter chart

Hi Experts
Sample pbix file below.

https://www.dropbox.com/s/ywmhup95dtpm6cd/Test_file.pbix?dl=0

Look at the donut chart and measure UR when you select upward trending the value does not change remains at 876.

Here is the messure.

NoRep = VAR t = GENERATE ( SELECTCOLUMNS ( SUMMARIZE ( ALL ( PMS_COMPLAINT ), [Products], "__p-value", CALCULATE ( [p-value], ALL ( PMS_COMPLAINT[PMSReportability] ) ), "__TAU", CALCULATE ( [TAU 1], ALL ( PMS_COMPLAINT[PMSReportability] ) ), "__trend", CALCULATE ( [__trend], FILTER ( ALL ( PMS_COMPLAINT[PMSReportability] ), [__trend] = "No Trend" ) ) ), "_Product", [Products] ), RELATEDTABLE ( PMS_COMPLAINT ) ) RETURN COUNTAX ( t, [PMSReportability] ) + 0
4 REPLIES 4

The Power BI DAX engine uses a semantic data model approach. The idea is you design, load and structure your data in (ideally) a star schema, use the visuals to structure the data On the page and measures to create the buisness logic. I can tell from your measure that you are not leveraging these things for your solution. There should be no need to use GENERATE, SUMMARIZE, ADDCOLUMNS, RELATEDTABLE in most DAX measures. those that write measures this way normally have a SQL background.  You need to look at the problem differently in DAX. 

This article I wrote may help you. https://exceleratorbi.com.au/the-optimal-shape-for-power-pivot-data/



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
Anonymous
Not applicable

Thanks Matt for the feedback, but I am stuck, hence why I have posted. Do you have a solution?

Please let us know what exactly you wanted to get from that measure.

Anonymous
Not applicable

To filter the data set and show only upward trending product.
Which should be zero, in the example as we only have down ward trending items see arrows in table directly above the donut chart.

And make the messure run faster if possible.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.