Forum Discussion
Running Totals Measure question
I am trying to figure out running totals. I have a matrix that has the previous years running total by month and the current year. The aggregate correctly, however in the cells in the table under current year, the PY(previous year) YTD (year to date) total is displayed for each month in the CY(current year). I would like to blank out those fieds in the matrix
Here is the dax measure i wrote to calculate the running totals in 20222, and then copied for another measure and adjusted for 2023
Drew
5 Replies
- Jihwan_KimSuper User
Hi,
I am not sure how your datamodel looks like, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
I hope the below can provide some ideas on how to create a solution for your datamodel.
- westmanRegular Visitor
Jihwan_Kim Thank you for your assistance..
Apologies im relatively new to Power bi and daxI formatted your measure below as:
RT labor 2023 =Var _condition =Max('Datestbl'[Year] ) = 2023ReturnIF(Not ISBLANK([Total Payroll Wages] ),CALCULATE( [Total Payroll Wages], DATESYTD( 'Datestbl'[Date] ))Divide ( _condition, _condition ))However, it returned zero data when applying it to the matrix visual. just blank all blank rows.Please see attached pic of datamodel and measure outputThankswestman- Jihwan_KimSuper User
Hi,
Please share your sample pbix file's link, and then I can try to look into it.
Thank you.