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
Tiff
Helper I
Helper I

Created mesure is wrong

Hi everyone ! 

 

On a report, I created two mesures, and the change with the filters (6 filters). 

Then, I want to have a percentage, so I divide mesure1 by mesure2 : 

 

newMesure = [mesure1]/[mesure2]. 

The problem is the newMesure isn't correct ! 😮 

I display my mesure1 and mesure2 and the value change with the filter. 

I saw, by modifying the filters that newMesure changes. But it's never the correct value ! If I do my operation on Excel, 616/11408 is not 1.34 % 😮 

How can I do ? I checked the filters and nothing... Any ideas ? 


Thank you very much for your help ! 

Tiff

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

you can adjust the second measure with TREATAS/INTERSECT
https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

9 REPLIES 9
Tiff
Helper I
Helper I

Hi everyone, 

 

I found my problem, and I don't think I can solve it. 

The mesure 1 and 2 take their data in different tables. So I have two filter for the date for example, one filter for mesure 1, the other for mesure 2. So, when I adapt the first filter, mesure 1 is correct, but not mesure 2, so the new calculated mesure is wrong. And when I adapt the second filter, mesure 1 is wrong and mesure 2 isn't, so the new calculated mesure is wrong two. 
I don't see a way to do it differently. 

 

Thanks for your help

Tiff

Stachu
Community Champion
Community Champion

you can adjust the second measure with TREATAS/INTERSECT
https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Thank you very much ! 

Stachu
Community Champion
Community Champion

are you sure it's a measure and not calculated column? Calculated column could have the behaviour you describe, as it would calculate % per row and then sum, while measure would sum first and then calculate ratio



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Hi, 

 

 

Yes, I clicked on "New Mesure" above "new Column", so I'm pretty sure it's really a mesure.... 

Thank you for your help ! 

Hi, 

EssaiMesureErronnée.PNG

 

EssaiMesureErronnée.PNG

 

See that ? On the right, we can see it's a mesure... 
On the report, it's writtent that 4384-51=4384 and 11408-616=11255.... 
The same for the percentage, where 51/4384 is not 1.45 % 616/11408 neither.... 

I don't know how to do... It is so strange ! And I'm completly stuck for the rest of my work... 

 

Thannk you for your help, 

Tiff

Stachu
Community Champion
Community Champion

can you share syntax for measure 1 & measure2?

are you sure that filters for all card visuals are the same?

 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

HI @Tiff,

 

Can you please share more detail information to help us clarify your scenario?

How to Get Your Question Answered Quickly

 

In addition, you can also take a look at following blog about how to nested multiple measures:

Optimizing DAX expressions involving multiple measures

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Tiff
Helper I
Helper I

It's really strange... 

I tried with newMesure = DIVIDE(Mesure1;Mesure2;1), and the result is different from newMesure = Mesure1/Mesure2 ! 
However, the filters applied are the same.... 

Thx for your help... 

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.