Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hello,
i have to sum days along with month like this
day, sumByDay, SumByMonth
01/01/2022 10, 25
02/01/2022 12, 25
03/01/2022 3 , 25
01/02/2022 9 , 11
02/02/2022 2 , 11
My problem is the filter context
when i use remove all
its give me all dates but i need only for that month
how can i achive that?
Thanks alot
Solved! Go to Solution.
A seemly simple solution, but the mechanism under the hood is complex enough.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Thanks CNENFENL
Looks good.
Hi @Urielpc ,
Please try:
Measure = CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),YEAR([Day])=YEAR(MAX('Table'[Day])) && MONTH([Day])=MONTH(MAX('Table'[Day]))))
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
A seemly simple solution, but the mechanism under the hood is complex enough.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Make sure that you have a Year Month column on your date table then use
Sum by Month =
var currentMonth = SELECTEDVALUE( 'Date'[Year Month])
return CALCULATE( [Base measure], REMOVEFILTERS('Date'), 'Date'[Year Month] = currentMonth )
User | Count |
---|---|
13 | |
10 | |
8 | |
7 | |
5 |
User | Count |
---|---|
24 | |
16 | |
15 | |
10 | |
7 |