Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
I've a question hopefully somebody can help me out.
I have a table with units per month of the last 24 months. (see table below)
I want to calculate the MAT in DAX and I use the following DAX below
Solved! Go to Solution.
Hi, @PMV
If help ,change your measure as below:
measure =
var measure1=CALCULATE(SUM(Table_1[Units]),DATESINPERIOD(Date_table[Date],LASTDATE(date_table[Date]),-12,MONTH))
return IF(DATEDIFF(CALCULATE(MIN('Table_1'[Date]),ALLSELECTED('Table_1')),MIN('Table_1'[Date]),MONTH)>=12,measure1)
It will show as below.
If it still unsolved ,please share me your PBIX/some sample data and expected result.
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @PMV
If help ,change your measure as below:
measure =
var measure1=CALCULATE(SUM(Table_1[Units]),DATESINPERIOD(Date_table[Date],LASTDATE(date_table[Date]),-12,MONTH))
return IF(DATEDIFF(CALCULATE(MIN('Table_1'[Date]),ALLSELECTED('Table_1')),MIN('Table_1'[Date]),MONTH)>=12,measure1)
It will show as below.
If it still unsolved ,please share me your PBIX/some sample data and expected result.
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
117 | |
101 | |
71 | |
61 |