cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Filter data not showing correct results in Card Visual - TRICKY

Hi Experts

 

See attached PBIX file. I am have trouble showing the filter results when selecting either No Trend and or Significant Trend in the Card Visual to the right of the table. 

So if a user select No Trend i would expect to see the result 912 to be shown in the card visual and so on when selecting the Significant Trend button.

 

 

https://www.dropbox.com/s/g9mplolmeu9jlhj/Sample__Test.pbix?dl=0

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

Hi @Anonymous,

 

When you filter the trend in card, you change the right card to show no Trend/ Significant Trend, the two measure depends on the measure “P-value”, but the issue is that the p-value looks meaningful for the product in your shared table, we can try to modify your measures to following to meet your requirement.

 

No Trend = 
CALCULATE (
    IF (
        ISBLANK ( COUNTA ( 'PMS_COMPLAINT'[MATERIAL_ID] ) ),
        BLANK (),
        COUNTA ( 'PMS_COMPLAINT'[MATERIAL_ID] )
    ),
    FILTER (
        ALLSELECTED ( PMS_PARTS[Product] ),
        CALCULATE('_Measures'[p-value]) > 0.05
    )
) + 0
Significant Trend = CALCULATE(    
    IF (
        ISBLANK ( COUNTA ( 'PMS_COMPLAINT'[MATERIAL_ID] ) ),
        BLANK (),
        COUNTA ( 'PMS_COMPLAINT'[MATERIAL_ID] )
    ),
    FILTER (
        ALLSELECTED ( PMS_PARTS[Product] ),
        CALCULATE('_Measures'[p-value]) <= 0.05
    )
) + 0

Filter-data-not-showing-correct-results-in-Card-Visual-TRICKY-1.pngFilter-data-not-showing-correct-results-in-Card-Visual-TRICKY-2.png

 

Community Support Team _ DongLi
If this post helps, then please consider Accept it as the solution to help the other members find it more

Community Support Team _ Dong Li
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

3 REPLIES 3
v-lid-msft
Community Support
Community Support

Hi @Anonymous,

 

When you filter the trend in card, you change the right card to show no Trend/ Significant Trend, the two measure depends on the measure “P-value”, but the issue is that the p-value looks meaningful for the product in your shared table, we can try to modify your measures to following to meet your requirement.

 

No Trend = 
CALCULATE (
    IF (
        ISBLANK ( COUNTA ( 'PMS_COMPLAINT'[MATERIAL_ID] ) ),
        BLANK (),
        COUNTA ( 'PMS_COMPLAINT'[MATERIAL_ID] )
    ),
    FILTER (
        ALLSELECTED ( PMS_PARTS[Product] ),
        CALCULATE('_Measures'[p-value]) > 0.05
    )
) + 0
Significant Trend = CALCULATE(    
    IF (
        ISBLANK ( COUNTA ( 'PMS_COMPLAINT'[MATERIAL_ID] ) ),
        BLANK (),
        COUNTA ( 'PMS_COMPLAINT'[MATERIAL_ID] )
    ),
    FILTER (
        ALLSELECTED ( PMS_PARTS[Product] ),
        CALCULATE('_Measures'[p-value]) <= 0.05
    )
) + 0

Filter-data-not-showing-correct-results-in-Card-Visual-TRICKY-1.pngFilter-data-not-showing-correct-results-in-Card-Visual-TRICKY-2.png

 

Community Support Team _ DongLi
If this post helps, then please consider Accept it as the solution to help the other members find it more

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Sorry for asking can you shed some light on

https://community.powerbi.com/t5/Desktop/Filtered-data-not-showing-correctly-in-Bar-graph/m-p/782156...

 

since you solved the other question in lighthing speed. I have used your method for the rest of my dashboard and it works fine, just stuck on one last part.

Anonymous
Not applicable

Community Support Team _ DongLi,  thank you thank you, long live and god bless.

 

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors