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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

DAX for variance

Hi,

I have a requirement to calculate financial report variance which has Actual and Forecast columns, ideally variance should be Actual-Forecast but since my user is looking for a different requirement as shown below. The forecast column for Period 1 and 2 are empty so there he wants actual to be displayed also, in periods where forecast is existing irrespective of actual values present or not he wants forecast to be displayed, which is same as "2+10" row.

 

neelofarshama_0-1617373289306.png

Please help em to create DAX for "2+10" row DAX.

 

Any help would be highly appreciated.

 

Thanks In Advance,

Neelofar Shama.

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

You could use the following steps:

Step1 ,import data and then transpose table, then apply and colse :

v-luwang-msft_0-1617694672755.png

 

Step 2,use the following measure:

two and ten =
var test1=if(MAX('Table'[Column3])="Actual","ten and two",MAX('Table'[Column3]))    
var test2=IF(test1<>BLANK(),test1,MAX('Table'[Column2]))  
return test2

 

v-luwang-msft_1-1617694777683.png

 

 

 

Wish it is helpful for you !

 

Best Regards

Lucien

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

You could use the following steps:

Step1 ,import data and then transpose table, then apply and colse :

v-luwang-msft_0-1617694672755.png

 

Step 2,use the following measure:

two and ten =
var test1=if(MAX('Table'[Column3])="Actual","ten and two",MAX('Table'[Column3]))    
var test2=IF(test1<>BLANK(),test1,MAX('Table'[Column2]))  
return test2

 

v-luwang-msft_1-1617694777683.png

 

 

 

Wish it is helpful for you !

 

Best Regards

Lucien

amitchandak
Super User
Super User

@Anonymous , Try a measure like assuming actual and forecast are measures 

 

Measure = if(isblank([actual], [forecast],[actual])

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.