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

Why result is wrong when slicer select a value in dropdown

Hi Power BI team,

 

I posted this message yesterday but it seems it does not appear in the forum and I will repost again.

When I select "All" in the Sector slicer, all the reporting view generate the correct figure, and everything is fine... until....

 

 

P1.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PROBLEM:

Until when I select a specific value in the Sector slicer, ....

 

Problem 1 - the sector percentage figure section generate wrong value (see Q1). In this example, I select resources in the sector dropdown, and the Resource percentage is 100% which is correct but others are wrong.

Problem 2 - in Q2, there should be on 7 records with all having Target machine status of "Assessed" but the table provides more than 7 rows.

 

My Dax formula:

 

All individual sector percentage is computed with individual Nominator divided by a common denominator

 

Denominator - 

MeasureTotal = Calculate(Countrows('Asssessment_Action_20190219'),
                          DATESINPERIOD('Asssessment_Action_20190219'[Last Assessment Date1].[Date], TODAY(),-13,MONTH)
                           )
 
Nominator - 
MeasureResource = Calculate(Countrows('Asssessment_Action_20190219'),
                                                 'Asssessment_Action_20190219'[Sector]="RESOURCES",
                                                  DATESINPERIOD('Asssessment_Action_20190219'[Last Assessment Date1].[Date], TODAY(),-13,MONTH))/ [MeasureTotal]
 
 
Hope you can provide a clue. I have tried using ALLExcept and it doesn't help.
 
Thanks
Tuff
 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi Cheenu Singh,

 

I managed to find the solution. It is my Dax problem.

The correct DAX should be 

MeasureResource = Calculate(Countrows(filter('Asssessment_Action_20190219',  
                                 'Asssessment_Action_20190219'[Sector]="RESOURCES")),

                              DATESINPERIOD('Asssessment_Action_20190219'[Last Assessment Date1].[Date], TODAY(),-13,MONTH))/ [MeasureTotal]

 

I will close this issue

thanks.

View solution in original post

2 REPLIES 2
CheenuSing
Community Champion
Community Champion

Hi @Anonymous 

 

 

It will be good if you can share data and pbix file on OneDrive / Google Drive and post the link here to better understand and arrive at a solution.

 

 

Cheers

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
Anonymous
Not applicable

Hi Cheenu Singh,

 

I managed to find the solution. It is my Dax problem.

The correct DAX should be 

MeasureResource = Calculate(Countrows(filter('Asssessment_Action_20190219',  
                                 'Asssessment_Action_20190219'[Sector]="RESOURCES")),

                              DATESINPERIOD('Asssessment_Action_20190219'[Last Assessment Date1].[Date], TODAY(),-13,MONTH))/ [MeasureTotal]

 

I will close this issue

thanks.

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.