Forum Discussion
Megha2498
2 years agoFrequent Visitor
Power BI DAX
Hi I need a DAX to calculate the variance % for etime data. I am trying to using some date related DAX but it is not helping me. The variance I am trying to get is (# of open tickets in previo...
- 2 years ago
Hi Megha2498,
You can create a calculated column below and adjust the output format to percentage:
In plain text:
calc_column_solution = VAR curMonthValue = [Open Requests (Reporting Month)] VAR curMonth = [Month] VAR prevMonth = MAXX ( FILTER ( tbl_with_data, [Month] < curMonth ), [Month] ) VAR prevMonthValue = MINX ( FILTER ( tbl_with_data, [Month] = prevMonth ), [Open Requests (Reporting Month)] ) RETURN DIVIDE ( prevMonthValue - curMonthValue, prevMonthValue )Best Regards,
Alexander
barritown
Solution Sage
2 years agoHi Megha2498,
You can create a calculated column below and adjust the output format to percentage:
In plain text:
calc_column_solution =
VAR curMonthValue = [Open Requests (Reporting Month)]
VAR curMonth = [Month]
VAR prevMonth = MAXX ( FILTER ( tbl_with_data, [Month] < curMonth ), [Month] )
VAR prevMonthValue = MINX ( FILTER ( tbl_with_data, [Month] = prevMonth ), [Open Requests (Reporting Month)] )
RETURN DIVIDE ( prevMonthValue - curMonthValue, prevMonthValue )
Best Regards,
Alexander