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 been struggling to create a chart the way I wanted to for a while now and thought I would ask for help as I can't find any concrete answers.
I have a table formatted as follows
Date | Name | Valid | Price |
1/1/2023 | John | Yes | $1 |
1/1/2023 | John | No | $4 |
1/1/2023 | Jane | Yes | $1 |
1/2/2023 | John | Yes | $3 |
1/2/2023 | Gary | No | $2 |
The chart I am looking to display has two slicers that need to apply to it, Date and Valid (I have already created a calendar table and linked it appropriately).
What I am looking to display is a histgram that shows:
X-Axis: The summed price
Y-Axis: The number of Names that had a summed price of x in the selected date range on the Y axis
So in this example
Date Range: 1/1/2023-1/1/2023, Valid: Yes
Expect bar of height 2 at price 1 because there are two people who have a total price of 1 in that range of time
Date Range: 1/1/2023-1/2/2023, Valid: No
Expect to see a bar of height 1 at price 2 and 4.
Date Range: 1/1/2023-1/2/2023, Valid: Yes or No
Expect bar of height 1 at price 8, 2, and 1
etc
Solved! Go to Solution.
Hi @cduggan ,
Please try:
First create a new table for x-axis:
Summed Price = GENERATESERIES(MIN('Table'[Price]),SUM('Table'[Price]))
Then apply the measure to the chart:
Measure =
var _a = SUMMARIZE('Table','Table'[Name],"Price",SUM('Table'[Price]))
return CALCULATE(COUNT('Table'[Name]),FILTER(_a,[Price]=SELECTEDVALUE('Summed Price'[Price])))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @cduggan ,
Please try:
First create a new table for x-axis:
Summed Price = GENERATESERIES(MIN('Table'[Price]),SUM('Table'[Price]))
Then apply the measure to the chart:
Measure =
var _a = SUMMARIZE('Table','Table'[Name],"Price",SUM('Table'[Price]))
return CALCULATE(COUNT('Table'[Name]),FILTER(_a,[Price]=SELECTEDVALUE('Summed Price'[Price])))
Final output:
Best Regards,
Jianbo Li
If this post helps, then 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 |
---|---|
107 | |
98 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |