March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all i am new to PowerBI kindly help if you have any idea
I have a data set as shown below. I want to be able to select two versions data and get their difference and group that difference into 3 segments then plot them in a graph. For example i want to compare version A1 with version A6 and get the difference and group them if possible and plot them in the graph. The selection of version should be variable. Thank you in advance.
Sample Data Set -
Product | Month | Version | X |
Apple | Jul 2024 | A1 | 3000 |
Apple | Jul 2024 | A2 | 2000 |
Apple | Jul 2024 | A3 | 4000 |
Apple | Jul 2024 | A4 | 3400 |
Apple | Jul 2024 | A5 | 5400 |
Apple | Jul 2024 | A6 | 4300 |
Apple | Jul 2024 | A7 | 3200 |
Solved! Go to Solution.
Hi, @Prakash_A
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
Hi, @Prakash_A
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
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
115 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |