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
aishak12
Helper IV
Helper IV

Creating dynamic budget report

Hi, 

 

I'm creating a budget report with Actual and Budgeted numbers. If the month has already passed (JAN - OCT) I want the table matrix to pull Actual numbers that I have created seperate measures for. If the month has yet to pass I want the table matrix to pull budgeted amount (Nov - Dec). Is there any IF statement I can write for this to be possible. 

 

Column's used: 

 

aishak12_0-1605021103799.pngaishak12_1-1605021127348.png

 

Date format:  202001 =  January, 2020 Converted to Hierarchy for (Y,Q,M,D)

 

aishak12_2-1605021164725.png

 

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @aishak12,

I think provide some dummy data with raw table structure and expected results should help us clarify your scenario and test to coding formula on it.

How to Get Your Question Answered Quickly 
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
PaulDBrown
Community Champion
Community Champion

@aishak12 

 

If you have a calendar table with a YearMonth column (YYYYMM formated as a number) for the dates, you can create measures:

 

Sum of Sales = SUM(Actuals1[Actuals])
Sum Target = SUM(Target2[Target])

 

and the measure to use in your visual:

 

Sales and Budget = 
VAR YMToday = VALUE(FORMAT(TODAY(), "YYYYMM"))
RETURN
IF(MAX('Calendar Table'[YearMonth])< YMToday, [Sum of Sales], [Sum Target])

 

 

result.JPG

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






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