Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello, I block on a point I would like to have the measure for the sum of the work realized in the month n-1 according to the sectors and that it is changeable thanks to the segment just below which is this one in the time n.
for example, there my period of 12 months is 629 for the sector 1, I would like to display the value during the period n-24 months to n-12 months .
That is to say n-(2*x) to n-x
so I want to see by doubling my month if I am in decrease or increase compared to my month n-1 chooses.
I thank you for all your answers.
Solved! Go to Solution.
Here's one way to do it. Make two measures and put them in a stacked bar chart. This assumes you have a Date table in your model. In the pic, table on left is filtered to Product A to confirm it is working for the two months selected.
SelectedPeriod = [Total Qty] //use your measure
PreviousPeriod =
VAR mindate =
MIN ( 'Date'[Date] )
VAR maxdate =
MAX ( 'Date'[Date] )
VAR monthsselected =
DATEDIFF ( mindate, maxdate, MONTH )
VAR prevmax = mindate - 1
VAR prevmin =
EDATE ( mindate, -1 * ( monthsselected + 1 ) )
RETURN
CALCULATE (
[Total Qty],
ALL ( 'Date' ),
'Date'[Date] >= prevmin
&& 'Date'[Date] <= prevmax
)
Pat
Here's one way to do it. Make two measures and put them in a stacked bar chart. This assumes you have a Date table in your model. In the pic, table on left is filtered to Product A to confirm it is working for the two months selected.
SelectedPeriod = [Total Qty] //use your measure
PreviousPeriod =
VAR mindate =
MIN ( 'Date'[Date] )
VAR maxdate =
MAX ( 'Date'[Date] )
VAR monthsselected =
DATEDIFF ( mindate, maxdate, MONTH )
VAR prevmax = mindate - 1
VAR prevmin =
EDATE ( mindate, -1 * ( monthsselected + 1 ) )
RETURN
CALCULATE (
[Total Qty],
ALL ( 'Date' ),
'Date'[Date] >= prevmin
&& 'Date'[Date] <= prevmax
)
Pat
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
89 | |
86 | |
75 | |
69 | |
68 |
User | Count |
---|---|
220 | |
128 | |
117 | |
82 | |
77 |