Forum Discussion
Dynamic Formatting Error
- 5 months ago
Hi tom-lenzmeier , I just modified the DAX formula you were using and obtained the following result. Can you let me know if this is what you are looking for?
The issue with the sum on the date was causing an overflow error, so I took the maximum value and added it to the date to resolve the problem.
Display Value Fixed = VAR _AttrType = SELECTEDVALUE(UP_PRD_Agreements[Attribute]) VAR _Raw = SUM(UP_PRD_Agreements[Value]) VAR _RawMax = MAX(UP_PRD_Agreements[Value]) RETURN SWITCH( _AttrType, "EffectiveDate", FORMAT( DATE(1899, 12, 30) + INT(_RawMax), "MM/dd/yyyy" ), "Current Price", FORMAT(_Raw, "$#,##0"), "Current Price Valid From", FORMAT( DATE(1899, 12, 30) + INT(_RawMax), "MM/dd/yyyy" ), FORMAT(_Raw, "0") )
dax :
Fixed dax :Sample file :
Dynamic Formatting.pbix
Thanks,
If this response was helpful in any way, I’d gladly accept a kudo.
Please mark it as the correct solution. It helps other community members find their way faster
Not quite. Based on your earlier response, I have this measure:
The slicer is the missing piece:
In your original response, the matrix had the Toggle Display measure without the formatting. Does this make sense?
Hi tom-lenzmeier ,I do not have the measure "Toggle Display" in the shared Dynamic Formatting PBIX file. I believe you are referring to the other file I shared for the SCD tracking thread.
Dynamic Formatting pbix
Scd tracking pbix :
Thanks
If you found this helpful, please consider giving it a kudo and marking it as the accepted solution — it goes a long way in helping others facing the same issue.
For more Power BI tips and discussions, let’s connect on LinkedIn:
https://www.linkedin.com/in/natarajan-manivasagan
Cheers!