Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello! I want to create a DAX measure so it calculates the total sales of the month a this number will appear on the graph for everyday of the calculated month. Desirable result is filled with yeloow. Any help please?
The formulas of staked metrics look like this:
Solved! Go to Solution.
@bombom
Hi, I strongly recommend using the latest version, howver if that's not possible try this trick:
Sales MTD Fix =
CALCULATE(
[Sales MTD],
TREATAS(ENDOFMONTH('Calendar'[Date]),'Calendar'[Date]))
Hi, @bombom ,
So you can play with it like this:
If you select your visual, you can click this button as shown, and add constant line by Field.
The field would be the sum in month, for example something like this (Day = Day in Month):
Sales MTD = TOTALMTD([Sales], 'Calendar'[Date], ALLSELECTED('Calendar'[Day]))
Then it could look like this:
Thank you @vojtechsima for reaching my question!
I've tried to create a constant line, but, unfortunatelly, I couldn't find the field called Data label. Looks like it's due to I'm using old version of PBI Dec 2020, cause I'm using Windows 7. And I've tried to use a formula alone, with out a constant line, and so this formula calculated cumulative total from the first till the last day, like all another lines.
Maybe there any option, like in SQL's window functions, to make calculation inside DAX to sum sales over partition by month and as a result it will duplicate the same total amount for each day of the calculated month?
@bombom
Hi, I strongly recommend using the latest version, howver if that's not possible try this trick:
Sales MTD Fix =
CALCULATE(
[Sales MTD],
TREATAS(ENDOFMONTH('Calendar'[Date]),'Calendar'[Date]))
User | Count |
---|---|
96 | |
87 | |
78 | |
72 | |
68 |
User | Count |
---|---|
113 | |
105 | |
84 | |
65 | |
64 |