cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
nmaddock Regular Visitor
Regular Visitor

Dax Measure value not showing

Hi,

 

I have a measure based on all the jobs and have removed the filters from the evaluation context so I am expecting the same value to be displayed, for example all agreements of industry type 'Cafe' should be displaying 91.15 for 'KG's per M3 by Industry' but some are blank but I need a value in each cell, how can I achieve this?

 

1.png

Many Thanks Nathan

 

https://www.dropbox.com/s/dqsg36arrimeqk7/Power%20BI%20Sample.pbix?dl=0

1 ACCEPTED SOLUTION

Accepted Solutions
Super User I
Super User I

Re: Dax Measure value not showing

You have this in your measure:

 

IF(ISBLANK([Weight by Volume]),
BLANK(),
CALCULATE([Weight by Volume],
 
The Wight by volume was blank for these rows. This was outside your calculate statement, so the all did not affect it.
 

Try and change your measure to this:

KG's Per M3 by Industry = 
    IF(ISBLANK([Total Annual Revenue]),
        BLANK(),
        CALCULATE([Weight by Volume], 
        ALL(User[Sales Person])
       ,ALL(Agreement[Contract Signed Date], Agreement[Customer Contract Start Date])
       ,ALL(Site[Account Code], Site[Company Name], Site[Site Name], Site[Site Town], Site[PostCode])
       ,ALL(MaterialTypes[Material Type])
       ,ALL(ContainerTypes[Container Type])
        ))

The blue comment you have on your picture, not sure if you're reffering to the lift rate column as the other one does add up. If so, this is because you use a "FIRSTNONBLANK". The "total" row in the matrix will calculate the measure without row context, not just sum of the rows. Therefore it will only calculate for the firstnonblank it finds.

 

 

Love hearing about Power BI tips, jobs and news?
I love to share about these - connect with me!

Stay up to date on  linkedin-logo.png
Read my blogs on  powerbi.tips_.png

Remember to spread knowledge in the community when you can! tu.png



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!

Stay up to date on  linkedin-logo.png
Read my blogs on  powerbi.tips_.png



View solution in original post

1 REPLY 1
Super User I
Super User I

Re: Dax Measure value not showing

You have this in your measure:

 

IF(ISBLANK([Weight by Volume]),
BLANK(),
CALCULATE([Weight by Volume],
 
The Wight by volume was blank for these rows. This was outside your calculate statement, so the all did not affect it.
 

Try and change your measure to this:

KG's Per M3 by Industry = 
    IF(ISBLANK([Total Annual Revenue]),
        BLANK(),
        CALCULATE([Weight by Volume], 
        ALL(User[Sales Person])
       ,ALL(Agreement[Contract Signed Date], Agreement[Customer Contract Start Date])
       ,ALL(Site[Account Code], Site[Company Name], Site[Site Name], Site[Site Town], Site[PostCode])
       ,ALL(MaterialTypes[Material Type])
       ,ALL(ContainerTypes[Container Type])
        ))

The blue comment you have on your picture, not sure if you're reffering to the lift rate column as the other one does add up. If so, this is because you use a "FIRSTNONBLANK". The "total" row in the matrix will calculate the measure without row context, not just sum of the rows. Therefore it will only calculate for the firstnonblank it finds.

 

 

Love hearing about Power BI tips, jobs and news?
I love to share about these - connect with me!

Stay up to date on  linkedin-logo.png
Read my blogs on  powerbi.tips_.png

Remember to spread knowledge in the community when you can! tu.png



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!

Stay up to date on  linkedin-logo.png
Read my blogs on  powerbi.tips_.png



View solution in original post

Helpful resources

Announcements
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors