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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
sabd80
Helper III
Helper III

Wrong total

Hi,

I have a new measure that gives the wrong total.

 

New Measure =IF(ISBLANK([Forecast]), [Actual], [Forecast])

But the total of the New Measure is giving only the last month (12, August).

 

2024-08-23_18-37-04.png
how can I get the correct total?


I can't provide the data because it is connected to a model.

 

1 ACCEPTED SOLUTION
darkinvader_
Advocate I
Advocate I

Hi @sabd80 

 

first we need to understand is that it is not giving you last month august total it is giving you total of [Forecast], because in that context the [Forecast] is not blank and as per your measure's IF condition we're getting that value of Forecast Total. To resolve this issue you can use this modified version of your code

New Measure=

SUMX(
    VALUES('Calendar'[Date].[Month]),// in your case the Month column from your dataset
    IF(ISBLANK([Forecast]), [Actual], [Forecast])
)


If this helps do give a thumbs up and accep this as a solution

BR
Dark

View solution in original post

2 REPLIES 2
sabd80
Helper III
Helper III

Thank you so much @darkinvader_, it worked.

darkinvader_
Advocate I
Advocate I

Hi @sabd80 

 

first we need to understand is that it is not giving you last month august total it is giving you total of [Forecast], because in that context the [Forecast] is not blank and as per your measure's IF condition we're getting that value of Forecast Total. To resolve this issue you can use this modified version of your code

New Measure=

SUMX(
    VALUES('Calendar'[Date].[Month]),// in your case the Month column from your dataset
    IF(ISBLANK([Forecast]), [Actual], [Forecast])
)


If this helps do give a thumbs up and accep this as a solution

BR
Dark

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.