Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a page where the user filters to the current month and one of the visuals should show the next months orders. The other visuals on the page show the current month.
I tried removing the slicer from the Next Month visual but then it just shows every month's data.
I have an order table and a date table.
Solved! Go to Solution.
Hi @mds123 ,
Not sure about your data model, I made simple samples and you can check the results below:
Current = var _s =SELECTEDVALUE('Table'[Date].[MonthNo])
var _s2 = SELECTEDVALUE('Table'[Date].[Year])
RETURN CALCULATE(SUM('Order'[Value]),FILTER('Order',[Date].[Year]=_s2&&[Date].[MonthNo]=_s))
Next = var _s =SELECTEDVALUE('Table'[Date].[MonthNo])+1
var _s2 = SELECTEDVALUE('Table'[Date].[Year])
RETURN CALCULATE(SUM('Order'[Value]),FILTER('Order',[Date].[Year]=_s2&&[Date].[MonthNo]=_s))
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @mds123 ,
Not sure about your data model, I made simple samples and you can check the results below:
Current = var _s =SELECTEDVALUE('Table'[Date].[MonthNo])
var _s2 = SELECTEDVALUE('Table'[Date].[Year])
RETURN CALCULATE(SUM('Order'[Value]),FILTER('Order',[Date].[Year]=_s2&&[Date].[MonthNo]=_s))
Next = var _s =SELECTEDVALUE('Table'[Date].[MonthNo])+1
var _s2 = SELECTEDVALUE('Table'[Date].[Year])
RETURN CALCULATE(SUM('Order'[Value]),FILTER('Order',[Date].[Year]=_s2&&[Date].[MonthNo]=_s))
An attachment for your reference. Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
This can be achieved with Time Intelligence functions. Example measure:
Next Month Orders =
CALCULATE ( SUM ( Orders[Amount] ), DATEADD ( Dates[Date], 1, MONTH ) )
Proud to be a Super User!
User | Count |
---|---|
93 | |
85 | |
78 | |
67 | |
63 |
User | Count |
---|---|
113 | |
99 | |
97 | |
64 | |
59 |