Forum Discussion
Build a compare matrix
- Anonymous3 years ago
HI Syndicate_Admin ,
Please check the model.DimModel;
relationships:
Absolute Difference = VAR _COL = CALCULATETABLE(VALUES('Table'[Type]), 'Table'[Model] = MAX('DimModel'[Model])) VAR _ROW = CALCULATETABLE(VALUES('Table'[Type]), 'Table'[Model] = MAX('Table'[Model])) VAR _ROW_COUNT = COUNTROWS(_ROW) VAR _COL_COUNT = COUNTROWS(_COL) VAR _DIFF_COUNT = COUNTROWS(INTERSECT(_COL,_ROW)) VAR _RESULT = IF(MAX('DimModel'[Model])>=MAX('Table'[Model]),ABS(_COL_COUNT-_DIFF_COUNT),ABS(_ROW_COUNT-_DIFF_COUNT)) RETURN _RESULTBest Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
HI Syndicate_Admin ,
Please check the model.
DimModel;
relationships:
Absolute Difference =
VAR _COL = CALCULATETABLE(VALUES('Table'[Type]), 'Table'[Model] = MAX('DimModel'[Model]))
VAR _ROW = CALCULATETABLE(VALUES('Table'[Type]), 'Table'[Model] = MAX('Table'[Model]))
VAR _ROW_COUNT = COUNTROWS(_ROW)
VAR _COL_COUNT = COUNTROWS(_COL)
VAR _DIFF_COUNT = COUNTROWS(INTERSECT(_COL,_ROW))
VAR _RESULT = IF(MAX('DimModel'[Model])>=MAX('Table'[Model]),ABS(_COL_COUNT-_DIFF_COUNT),ABS(_ROW_COUNT-_DIFF_COUNT))
RETURN
_RESULT
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum