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 everyone
I have created a new table with "Enter Data" option. I want to use this table for bucketing. Please see the following two tables.
I want to calculate "Total Accidents" by Timeinterval. for example
how many accidents occured in between 07:00 - 12:00 19:00-06:00 and 13:00-18:00
and want to show in a column bar chart.
Solved! Go to Solution.
Hi @Anonymous,
To create a mreasure as below.
Measure = VAR mas = MAX ( Timeinterval[Starttime] ) VAR mae = MAX ( Timeinterval[Endtime] ) RETURN IF ( mas < mae, CALCULATE ( SUM ( trafficAccident[Total Accidents] ), FILTER ( ALL ( trafficAccident ), trafficAccident[Accident time] >= mas && trafficAccident[Accident time] <= mae ) ), IF ( mas > mae, CALCULATE ( SUM ( trafficAccident[Total Accidents] ), FILTER ( ALL ( trafficAccident ), trafficAccident[Accident time] >= mas || trafficAccident[Accident time] <= mae ) ) ) )
For more details ,please check the pbix as attached.
Regards,
Frank
Hi @Anonymous,
To create a mreasure as below.
Measure = VAR mas = MAX ( Timeinterval[Starttime] ) VAR mae = MAX ( Timeinterval[Endtime] ) RETURN IF ( mas < mae, CALCULATE ( SUM ( trafficAccident[Total Accidents] ), FILTER ( ALL ( trafficAccident ), trafficAccident[Accident time] >= mas && trafficAccident[Accident time] <= mae ) ), IF ( mas > mae, CALCULATE ( SUM ( trafficAccident[Total Accidents] ), FILTER ( ALL ( trafficAccident ), trafficAccident[Accident time] >= mas || trafficAccident[Accident time] <= mae ) ) ) )
For more details ,please check the pbix as attached.
Regards,
Frank
Hi @Anonymous,
Does that make sense? If so, kindly mark my answer as a solution to close the case.
Regards,
Frank
Hi Frank
THankyou very much for your help.
I really appreciate that
Regards
Asim/skiper
Take a look at these two Quick Measures as I think you want something like them.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364
https://community.powerbi.com/t5/Quick-Measures-Gallery/Periodic-Billing/m-p/409365
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 |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |