Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |