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

Add a value within a measure manually

Hello.

I need your help please with the below measure we use to calculate our targets for the months July 2022-June 2023. 

The measure is FY23 July = SUMX('FY23 Targets',[Revenue June FY22]*(1+'FY23 Targets'[MoM %])).

Under [Revenue June FY22] there are 2 countries showing $0 (as they had no revenue back in June 2022) and due to that the FY23 July measure gives a $0 so do the rest of the months.
For our reporting purposes though we want to apply the value of $10,000 to these 2 countries for FY23 July so that the rest of the months (until June 2023) will calculate the targets based on the mom % we have been assigned. 
Is this doable?
Thank you,
V
 
2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User
Super User

@vbis Maybe:

FY23 July = 
  VAR __Sum = SUMX('FY23 Targets',[Revenue June FY22]*(1+'FY23 Targets'[MoM %]))
RETURN
  IF(__Sum = 0, 10000, __Sum)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

@vbis This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

@vbis Maybe:

FY23 July = 
  VAR __Sum = SUMX('FY23 Targets',[Revenue June FY22]*(1+'FY23 Targets'[MoM %]))
RETURN
  IF(__Sum = 0, 10000, __Sum)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thank you so much @Greg_Deckler. It worked and i have to admit that i needed someone to unblock me 🙂 

There is another issue now though. The $20K of these 2 countries are not added into the all up sum (the sum of the region these countries are part of). 

Any ideas? 

Thank you again

@vbis This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thank you again @Greg_Deckler! It worked

 

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.

Top Solution Authors