March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hai Expert,
I need to build a report for finance which is they want to show total amount of sales. We have slicer year and month, for example i choose year 2023 and month May so the line graph below will automatically shows sales amount from January to May. Is any dax function to create above scenario.
Solved! Go to Solution.
SORRY FOR CONFUSION!
PLEASE TRY THIS
pls try this
measure2 =
VAR _Yearselect = MAX('dup calendar'[Year])
VAR _MonthSelect = MAX('dup calendar'[Month Number])
RETURN
CALCULATE(
[Sales] , KEEPFILTERS(FILTER(ALL('Calendar'),
'Calendar'[Year]= _Yearselect&&'Calendar'[Month Number]=_MonthSelect)))
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
If a slicer is filtering one month, there is no way to show additional months from the same table on either the rows or the columns
Therefore, we must create a separate table that is not subject to filtering from the slicer. This way, columns from that table show all the rows, and we can control their visibility through a measure.
I want to shows in Month, do I need to change DATEBETWEEN and date
you need to disable the link between the calendar and the spreadsheet next
this is how you can read
measure =
VAR _Dateselect = MAX('Calendar'[Date])
VAR _YearSelect = YEAR(_Dateselect)
RETURN
CALCULATE(
[Sales] , KEEPFILTERS(FILTER(ALL('table'),
'table'[Date]>= DATE(_YearSelect,1,1)&&'table'[Date]<=_Dateselect)))
Hai tq for response, I want to show in Month, I need to change YearSelect to MonthSelect right?
SORRY FOR CONFUSION!
PLEASE TRY THIS
Hai Expert,
I managed to do as follow your dashboard guidance, as shown below;
Another question, may I know is it possible from the same slicer, the yellow KPI just shown value for March only and the graph shown for last month as above
pls try this
measure2 =
VAR _Yearselect = MAX('dup calendar'[Year])
VAR _MonthSelect = MAX('dup calendar'[Month Number])
RETURN
CALCULATE(
[Sales] , KEEPFILTERS(FILTER(ALL('Calendar'),
'Calendar'[Year]= _Yearselect&&'Calendar'[Month Number]=_MonthSelect)))
Tq so much expert, u help me a lot 😊
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hai Expert, May I know why we need to duplicate the calendar table?
If a slicer is filtering one month, there is no way to show additional months from the same table on either the rows or the columns
Therefore, we must create a separate table that is not subject to filtering from the slicer. This way, columns from that table show all the rows, and we can control their visibility through a measure.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
91 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
73 | |
68 |