Forum Discussion
Combining Column Data
- 4 months ago
Hii PowerBIUser1990
You can create a calculated column to always return the deepest non-blank level using DAX:
Property Type = COALESCE( 'Table'[Level 4], 'Table'[Level 3], 'Table'[Level 2], 'Table'[Level 1] )For Property Category, if it is driven by Level 2:
Property Category = COALESCE('Table'[Level 2], 'Table'[Level 1])This ensures consistent classification and works correctly across all visuals and slicers.
Hi PowerBIUser1990 ,
Can you please share the specific logic for the property type and property category?
Since you mentioned that the property type is working well with the COALESCE function, we can apply a similar approach for the property category.
For the property category, we should prioritize Level 1, then Level 2, as the COALESCE function relies on order and returns the first non-null value.
Based on the requirements, we can implement this logic. Is there a flag or identifier column that specifies which category level to use? Please share examples of your requirement along with some sample data.
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!