Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |