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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mehdimns
Frequent Visitor

DAX measure doesn't display correctly in Canvas

Hello Team,

 

I'm new to this forum, nice to meet you all.

I'm currently facing a challenge on a Power BI measures creation.

I think the error comes from my lack of knowledge on DAX functions, maybe the solution will seem obvious.

 

Context : I created 3 distinct measures as followed :

 

1st : 

CountPIcorrect = COUNTROWS( FILTER( 'PI DISC', CONTAINSSTRING('PI DISC'[PI_Analysis], "batch") && 'PI DISC'[progression] = 1 ).

 

2nd:

CountnoPIwithStock = COUNTROWS( FILTER( 'PI DISC', CONTAINSSTRING('PI DISC'[PI_Analysis], "Stock owned") ).

 

3rd : 

CountDistinctPIConcat = CALCULATE( COUNTROWS(SUMMARIZE('PI DISC', 'PI DISC'[concatpnmstmloc])), FILTER( 'PI DISC', CONTAINSSTRING('PI DISC'[PI_Analysis], "batch") ) )

 

These measures should each give me a number of rows as a result.

Then, I create my final desired measure :

 

Progression rate = DIVIDE([CountPIcorrect], ([CountnoPIwithStock] + [CountDistinctPIConcat])).

 

My issue :

When I want to create a Card visual, the measure "Progression rate" doesn't display correctly, why ?

 

NB : I checked every data type and harmonized them for the 3 distinct measures and the final one.

Maybe I'm doing something wrong in the dax formulas but I don't see where....

 

 

Thank you,

 

Have a great day,

3 REPLIES 3
andhiii079845
Solution Sage
Solution Sage

Progression rate = DIVIDE([CountPIcorrect], ([CountnoPIwithStock] + [CountDistinctPIConcat])).

-> 

 

Progression rate =
VAR __1 =  [CountPIcorrect]
VAR __2 = [CountnoPIwithStock]
VAR __3 = [CountDistinctPIConcat]
RETURN 
DIVIDE(__1, (__2+ __3))

 

IF it not work, than change it to this and modify RETURN __1 to __2, __3 and look what is wrong. Perhaps a filter is to much on the card visual

Progression rate =
VAR __1 =  [CountPIcorrect]
VAR __2 = [CountnoPIwithStock]
VAR __3 = [CountDistinctPIConcat]
RETURN 
__1 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hello Andhi,

 

Thanks for your reply.

 

I've been looking in my measure and it looks like the final measure "Progression rate" is not the measure inducing the display error.

 

Indeed, i found out that the measure 1 and 3 are not giving any result (tried to display the measures in a Card visual but only getting '--') and I don't understand why. 

 

On the other hand, the 2nd measure is working fine (CountnoPIwithStock = COUNTROWS( FILTER( 'PI DISC', CONTAINSSTRING('PI DISC'[PI_Analysis], "Stock owned") ).) and this measure's script is very similar to the first one except having only one condition in the filter function.

 

What would be the origin of the issue here in the measure 1 and 3 ?

 

I looked at the way multiple conditions should be stated in a FILTER function and used appropriately the "&&" and verified that the datatype of the "progression" field in the dataset is whole number, which is the case... 

(To me the error can't come from the datatype of "PI_Analysis" because the measure 2 is working fine and giving me the desired result.)

Without some data example its very difficult. You can try to modify the messure;

CountPIcorrect = COUNTROWS( FILTER( 'PI DISC', CONTAINSSTRING('PI DISC'[PI_Analysis], "batch") && 'PI DISC'[progression] = 1 ).

 

Try it only with the batch condition or the = 1 condition to find out where the problem is. Perhaps put all involved columns of the measure  in a matrix with the measure result and look what happened. 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Solution Authors