Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Community,
With the below table
If any of the measure (Cost) and measure(Prior quarter values) contains nulls the Variance column should not perform the calculation, If both the measures contains values then the variance should pop up with correct totals as I am observing the wrong sum of total for each measure.
For totals to be correct i have used-
Product | Cost | prior quarter values | Variance (C-B) |
A | 10000 | 9000 | -1000 |
B | 20000 | 0 | -20000 |
D | 0 | 5000 | 5000 |
E | 10000 | 7000 | -3000 |
C | 30000 | 0 | -30000 |
G | 0 | 15000 | 15000 |
D | 15000 | 14000 | -1000 |
C | 30000 | 0 | -30000 |
Solved! Go to Solution.
@deepakv ,
variance = if(not(isblank([COst])) && not(isblank([prior quarter values])) , [prior quarter values] -[Cost], blank())
or
variance =Sumx(values(Table[Product]), calculate( if(not(isblank([COst])) && not(isblank([prior quarter values])) , [prior quarter values] -[Cost], blank()))
@deepakv ,
variance = if(not(isblank([COst])) && not(isblank([prior quarter values])) , [prior quarter values] -[Cost], blank())
or
variance =Sumx(values(Table[Product]), calculate( if(not(isblank([COst])) && not(isblank([prior quarter values])) , [prior quarter values] -[Cost], blank()))
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
70 | |
55 | |
37 | |
31 |
User | Count |
---|---|
83 | |
64 | |
63 | |
49 | |
45 |