Forum Discussion
Difference between two variable data
- Anonymous2 years ago
Hi, Anonymous
Based on your description, I have created many measures to achieve the effect you are looking for. Following picture shows the effect of the display.
Measure:
Diff = VAR _version1 = SELECTEDVALUE ( Version1[Version1] ) VAR _version2 = SELECTEDVALUE ( Version2[Version2] ) VAR _version1Value = CALCULATE ( MAX ( 'Table'[X] ), FILTER ( 'Table', 'Table'[Version] = _version1 ) ) VAR _version2Value = CALCULATE ( MAX ( 'Table'[X] ), FILTER ( 'Table', 'Table'[Version] = _version2 ) ) RETURN IF ( _version1Value >= _version2Value, _version1Value - _version2Value, _version2Value - _version1Value )If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Yang
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, Anonymous
Based on your description, I have created many measures to achieve the effect you are looking for. Following picture shows the effect of the display.
Measure:
Diff =
VAR _version1 =
SELECTEDVALUE ( Version1[Version1] )
VAR _version2 =
SELECTEDVALUE ( Version2[Version2] )
VAR _version1Value =
CALCULATE (
MAX ( 'Table'[X] ),
FILTER ( 'Table', 'Table'[Version] = _version1 )
)
VAR _version2Value =
CALCULATE (
MAX ( 'Table'[X] ),
FILTER ( 'Table', 'Table'[Version] = _version2 )
)
RETURN
IF (
_version1Value >= _version2Value,
_version1Value - _version2Value,
_version2Value - _version1Value
)
If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Best Regards,
Yang
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
- Anonymous2 years agoNot applicable
Hi, thank you for the solution . the solution is somewhat of what i wanted but i want to know if this data can be populated into a column for further analysis and all. but thanks for this method