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.
HI Team,
i unpivoted 5 columns into one column namely agetype and value.
I am getting wrong totals for products as shown in the image. it is calculating 5 times the total ap balance for a given vendor, thereby giving wrong totals.
please advice on how to resolve this.
Solved! Go to Solution.
hi, @Anonymous
For your case, you could try this way:
this is my basic sample data
Now I unpivot the columns(Type1...Type5)
Now use AVERAGE and SUMX Function to create a measure like this:
Measure = var _table=SUMMARIZE('Table','Table'[Vendor]) return SUMX(_table,AVERAGE('Table'[Qty]))
Result:
Here is my sample pbix file, please try it.
If it is not your case, please share sample pbix file and expected output . You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.
By the way: there is a measure totals knowledge for this case. See the post about it here:
Best Regards,
Lin
Same issue, but in my case the instead of numbers i have a string and the calculation doesn't work any tips ?
hi, @Anonymous
For your case, you could try this way:
this is my basic sample data
Now I unpivot the columns(Type1...Type5)
Now use AVERAGE and SUMX Function to create a measure like this:
Measure = var _table=SUMMARIZE('Table','Table'[Vendor]) return SUMX(_table,AVERAGE('Table'[Qty]))
Result:
Here is my sample pbix file, please try it.
If it is not your case, please share sample pbix file and expected output . You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.
By the way: there is a measure totals knowledge for this case. See the post about it here:
Best Regards,
Lin
Thanks Lin @v-lili6-msft
This worked for me !! thanks for your example; which made it easier to understand.
Regards,
Ronak
Thanks Lin @v-lili6-msft
This worked for me !! thanks for your example; which made it easier to understand.
Regards,
Ronak
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 |
---|---|
115 | |
100 | |
88 | |
69 | |
61 |
User | Count |
---|---|
152 | |
120 | |
102 | |
87 | |
68 |