Forum Discussion
Use Subtotal Sum in Matrix for a Dynamically formatted Column
- 1 year ago
Hi SeungLee95 ,
Create a clean numeric measure for calculation.
SR_Actual =
IF (
SELECTEDVALUE(COUDashboard[APType]) = "Classic",
BLANK(),
SUM(COUDashboard[ServiceReadiness])
)Use a second measure for display using format string or Conditional Formatting.
Instead of showing "N/A" directly in the DAX measure, use Conditional Formatting to display "N/A" as a custom string for rows with APType = "Classic".
Create a DAX measure just for formatting, but you can’t use this for subtotaling, it’s for visual override only.DisplayLabel =
IF (
SELECTEDVALUE(COUDashboard[APType]) = "Classic",
"N/A",
FORMAT([SR_Actual], "#,0")
)Now create a Matrix
Add the SR_Actual measure to your Matrix.
Click the measure in the Values area > click the arrow > Conditional formatting > Field value.
Choose "Based on field" > DisplayLabel.
Select to apply to "Values only".Set the output as custom text, Power BI will now use "N/A" for classic rows and actual numbers elsewhere.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thanks and regards,
Chaithra E
Hi SeungLee95 ,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Regards,
Chaithra.