Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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,
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
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.
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.