Forum Discussion
Hide fields in a matrix
Hi,
If data is in a union formatting with 2 entries of entity, is it possible to hide two fields in a power bi visual for e.g. entity 1 below and not entity 2? Entity 2 would have all 5 fields and Entity 1 would have the first 3.
Thanks
Liam
Hey lherbert501,
If you already have 5 measures as columns, you can wrap each one in an IF() that checks the entity.Field4_Measure =
IF(SELECTEDVALUE(Entity) = "Entity 1", BLANK(), [Field4_Original])Do this for Fields 4 & 5 only, and leave the rest unchanged.
This way Entity 1 will just show blanks for those columns, but Entity 2 will still display them.Fixed? ✓ Mark it • Share it • Help others!
Best Regards,
Jainesh Poojara | Power BI Developer
3 Replies
- jaineshpMemorable Member
Hey lherbert501,
If you already have 5 measures as columns, you can wrap each one in an IF() that checks the entity.Field4_Measure =
IF(SELECTEDVALUE(Entity) = "Entity 1", BLANK(), [Field4_Original])Do this for Fields 4 & 5 only, and leave the rest unchanged.
This way Entity 1 will just show blanks for those columns, but Entity 2 will still display them.Fixed? ✓ Mark it • Share it • Help others!
Best Regards,
Jainesh Poojara | Power BI Developer - jaineshpMemorable Member
Hey lherbert501,
Calculated Measures
- Create measures that return BLANK() for Entity 1 Fields 4&5
- Use DAX like: IF([Entity]="Entity 1" AND [FieldName] IN {"Field4","Field5"}, BLANK(), [Value])
- Replace original fields with these measures in matrix
Test it first with one field to make sure it gives you the layout you want before applying to all fields.
Fixed? ✓ Mark it • Share it • Help others!
Best Regards,
Jainesh Poojara | Power BI Developer- lherbert501Post Prodigy