Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi everyone, I'm having some trouble trying to create a total of the revenue from my dataset. I am looking to total the revenue for the slicer selected year and month, and then compare it with the previous year's same month revenue. Here is the DAX query I've run so far -
Solved! Go to Solution.
@Ashish_Mathur Thank you very much for your prompt reply. Allow me to offer a different approach here:
Your code seems to be fine, but if it is not outputting the expected results, then try the following code.
Here's some dummy data
“Append1”
Create measures.
Revenue This Year-Month =
CALCULATE(
SUM('Append1'[qtdamount]),
FILTER('Append1',
'Append1'[scenario] = "Actual"
&&
Append1[rollup_level_4_name]="Revenue"
)
)
Revenue Last Month =
CALCULATE(
SUM('Append1'[qtdamount]),
FILTER(ALL('Append1'),
'Append1'[scenario] = "Actual"
&&
'Append1'[rollup_level_4_name] = "Revenue"
&&
'Append1'[ficalyear] = MAX('Append1'[ficalyear]) - 1
&&
'Append1'[ficalmonth] = MAX('Append1'[ficalmonth])
)
)
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Ashish_Mathur Thank you very much for your prompt reply. Allow me to offer a different approach here:
Your code seems to be fine, but if it is not outputting the expected results, then try the following code.
Here's some dummy data
“Append1”
Create measures.
Revenue This Year-Month =
CALCULATE(
SUM('Append1'[qtdamount]),
FILTER('Append1',
'Append1'[scenario] = "Actual"
&&
Append1[rollup_level_4_name]="Revenue"
)
)
Revenue Last Month =
CALCULATE(
SUM('Append1'[qtdamount]),
FILTER(ALL('Append1'),
'Append1'[scenario] = "Actual"
&&
'Append1'[rollup_level_4_name] = "Revenue"
&&
'Append1'[ficalyear] = MAX('Append1'[ficalyear]) - 1
&&
'Append1'[ficalmonth] = MAX('Append1'[ficalmonth])
)
)
Here is the result.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Try this approach
Revenue This Year-Month = CALCULATE(SUM('Append1'[qtdamount]),'Append1'[scenario] = "Actual",Append1[rollup_level_4_name]="Revenue")
Revenue in SPLY = calculate([Reenue this Year-Month],sameperiodlastyear(calendar[date]))
Hope this helps.
User | Count |
---|---|
97 | |
76 | |
76 | |
48 | |
26 |