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,
I have the following table and I need to build an histogram to interact with a date slicer but before I have to make the following calculation:
ID | Date | Sales |
1 | 01/01/2021 | 10 |
1 | 01/02/2021 | 5 |
2 | 01/01/2021 | 23 |
2 | 01/02/2021 | 42 |
2 | 01/03/2021 | 2 |
3 | 01/01/2021 | 44 |
4 | 01/01/2021 | 6 |
4 | 01/02/2021 | 9 |
Calculation: Sum of result the agrupation values by ID, and then build the histogram with the column "Sales" grouped. I have tried to do it with a group by, but it generates a table that is not interacting with the date slicer that I have. I would need to get something like the following and be able to pass it as a column to the histogram:
Slicer:
Dates between 01/01/2021 and 01/02/2021 |
ID | Sales |
1 | 15 |
2 | 65 |
3 | 44 |
4 | 15 |
Thanks!
Solved! Go to Solution.
Hi @FinYui8
Thanks for reaching out to us.
You can try this measure
Measure =
var _eachrow= CALCULATE(SUM('Table'[Sales]),FILTER(ALLSELECTED('Table'),'Table'[ID]=MIN('Table'[ID])))
var _total= CALCULATE(SUM('Table'[Sales]),ALLSELECTED('Table'))
return IF(ISINSCOPE('Table'[ID]),_eachrow,_total)
Or you can select Sum for that column,
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Hi @FinYui8
Thanks for reaching out to us.
You can try this measure
Measure =
var _eachrow= CALCULATE(SUM('Table'[Sales]),FILTER(ALLSELECTED('Table'),'Table'[ID]=MIN('Table'[ID])))
var _total= CALCULATE(SUM('Table'[Sales]),ALLSELECTED('Table'))
return IF(ISINSCOPE('Table'[ID]),_eachrow,_total)
Or you can select Sum for that column,
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the reply. Yes, I have done different tests, and the one you have given me, but as I said, the histogram only accepts one column as input values, it does not accept measurements. Thank you anyway.
Hi @Anonymous
Thanks for your reply. You can use this visual, it accepts measure as values,
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |