Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Everbody:
I hope you are well.
I have some experience in PowerBi ( not that advance) and I don´t figure out how to solve this issue.
I have a table of Purchase by year and organization taken from SAP (picture 1), then I would like to create one column (or measure) that shows the difference between the amounts in usd for 2 selected years. For example: if i selected 2017 and 2018 (picture 2).
It will always works to make the difference of 2 columns.
do you have any idea on how I can solve it out?
kind regards
Solved! Go to Solution.
Hi,
Firstly unpivod your puchase data for multiple year column into single column, lik
Then create Three different columns as
Oldest Year Purchase = CALCULATE(sum(Sheet1[Purchase]), Filter(Sheet1,Sheet1[Years]=Min(Sheet1[Years])))
Newest Year Purchase = CALCULATE(sum(Sheet1[Purchase]), Filter(Sheet1,Sheet1[Years]=Max(Sheet1[Years])))
Purchase Difference = [Newest Year Purchase]-[Oldest Year Purchase]
Then apply a slicer to select two table. The Purchase Difference field will always provide you the difference of two selected years.
Please let me know if you face any challange.
Hi,
Firstly unpivod your puchase data for multiple year column into single column, lik
Then create Three different columns as
Oldest Year Purchase = CALCULATE(sum(Sheet1[Purchase]), Filter(Sheet1,Sheet1[Years]=Min(Sheet1[Years])))
Newest Year Purchase = CALCULATE(sum(Sheet1[Purchase]), Filter(Sheet1,Sheet1[Years]=Max(Sheet1[Years])))
Purchase Difference = [Newest Year Purchase]-[Oldest Year Purchase]
Then apply a slicer to select two table. The Purchase Difference field will always provide you the difference of two selected years.
Please let me know if you face any challange.
Hi @lpalacios,
I have a table of Purchase by year and organization taken from SAP (picture 1), then I would like to create one column (or measure) that shows the difference between the amounts in usd for 2 selected years. For example: if i selected 2017 and 2018 (picture 2).
If I understand you correctly, you should be able to use the formula below to create a new measure to calculate the difference between the two selected year.
Diff of Selected Years = CALCULATE ( [Total Purchase], FILTER ( 'Date', 'Date'[Year] = MAX ( 'Date'[Year] ) ) ) - CALCULATE ( [Total Purchase], FILTER ( 'Date', 'Date'[Year] = MIN ( 'Date'[Year] ) ) )
As there isn't an easy way to add the new created measure into the exiting Matrix visual currently, you may need to show the measure with [Org] column on a new Matrix visual.
Regards
thanks!! but it does not work
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |