Forum Discussion
Pie chart from Measure
Hello Gurus,
some questions regarding to the problem have already been raised up, but I wasn't able to figure out the right solution 🤔
Following data:
| House | House-Part | Finishing date Plan | Finishing date real |
| 1 | 1 | 01 Jan | 01 Jan |
| 1 | 2 | 02Feb | 02 Feb |
| 1 | 3 | 04 Mar | 06 Jun |
| 2 | 1 | 03 Sep | 03 Sep |
| 3 | 3 | 01 Jan | 01Jan |
Additionally I have a slicer for the planned Finishing dates.
If the planned date = real finishing date then the House part is on time; if every house part is on time then the whole house is on time.
Here is the point: If I select the timespan from Jan to April then House 1 is not in time. If I select the timespan from Jan to 05 Feb. then House 1 is on time. Therefor I have created a measure which is working fine at the table, but now the plan is that there will be a pie chart to see the houses wich are o ntime and which are not in time.
Do you have any idea?
4 Replies
- burakkaragozSuper User
Hi Do57792 ,
Sounds like your measure logic is already solid, so the next step is shaping it for a pie chart. Here's how you can approach it:
- Create a new measure that returns a label like "On Time" or "Not On Time" per house. Something like:
HouseStatus = IF( CALCULATE( COUNTROWS(HouseParts), HouseParts[PlannedDate] <> HouseParts[RealDate] ) = 0, "On Time", "Not On Time" )- Build a summary table using SUMMARIZE or a calculated table if needed:
HouseSummary = SUMMARIZE( HouseParts, HouseParts[House], "Status", [HouseStatus] )- Use that status in your pie chart:
- Axis: Status
- Values: Count of House or DISTINCTCOUNT(HouseParts[House])
This way, your pie chart will show how many houses are fully on time vs not, based on the selected date range.
Also, make sure your slicer is filtering the date range correctly so the measure reflects the right context.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
translation and formatting supported by AI - ryan_mayuSuper User
- Do57792Advocate I
ryan_mayu & burakkaragoz : You are the best. thank you a lot !!!!
- ryan_mayuSuper User
you are welcome