Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
146 | |
87 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |