The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a matrix with a few things in there like budgets and Committed Costs etc. but the row subtotals are not displaying correctly.
In the Screenshot below you will see the Forecast Final Cost column where I used the following DAX formula to calculate it:
Solved! Go to Solution.
@IVIr_D this is because your [Committed Costs Total] compared to your [Revised Budget] at the total level has only one value for committed costs, and one value for budget. So the IF statement will be evaluated and either do the first option, or proceed to the next IF statement. In your table, the non total level will have some with budget greater than cost and some the other way around, but the total will be all or nothing. It's all about the 'evaluation context' of your DAX.
One way to fix it is to wrap your measure in a SUMX:
Forecast Final Cost Totals fix =
SUMX ( AreaMasterDescriptionTable , [Forecast Final Cost] )
Note, the 'AreaMasterDescriptionTable' in my measure above must be the same level of granularity as your table visual. Hope that makes sense?
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@IVIr_D this is because your [Committed Costs Total] compared to your [Revised Budget] at the total level has only one value for committed costs, and one value for budget. So the IF statement will be evaluated and either do the first option, or proceed to the next IF statement. In your table, the non total level will have some with budget greater than cost and some the other way around, but the total will be all or nothing. It's all about the 'evaluation context' of your DAX.
One way to fix it is to wrap your measure in a SUMX:
Forecast Final Cost Totals fix =
SUMX ( AreaMasterDescriptionTable , [Forecast Final Cost] )
Note, the 'AreaMasterDescriptionTable' in my measure above must be the same level of granularity as your table visual. Hope that makes sense?
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com