Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi all,
I have a new table being created and all is working correctly - except when - there is no data for a month period in the Driver Behaviour data but there is an infringement dated within that period. In this scenario, the table does not display a row for the month, and therefor doesn't lookup the infringement that existed in the period. In this scenario it is Nov 2021.
Can the below be adjusted to show ALL month periods - either
Driver Scoring Draft =
SUMMARIZE(
DriverBehaviour,
DriverBehaviour[Driver],
Dates[Date (bins) Month Period],
"Total Style Score",
CALCULATE(SUM(DriverBehaviour[Driver Style Points])),
"Total KM Travelled",
CALCULATE(SUM(DriverBehaviour[Trip Distance Final])),
"Infringements Count",
CALCULATE(COUNTROWS(FILTER(InfringementData,InfringementData[Penalty Type]="Speeding or Red light Camera")),
RELATEDTABLE(DriverBehaviour)
)
)
Hi @StidifordN ,
You can choose to show items with no data, if it doesn't work, please provide a sample to better solve the problem for you.
Hope it helps!
Best regards,
Community Support Team_ Scott Chang
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the response @v-tianyich-msft - but this isn't a visual as yet, this issue is in attempting to create the table data.
@StidifordN ,
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Try if this can help
Driver Scoring Draft =
SUMMARIZE(
Dates, // Assuming 'Dates' is your calendar table
Dates[Date (bins) Month Period],
"Driver", FIRSTNONBLANK(DriverBehaviour[Driver], "Unknown"), // Replace "Unknown" with a suitable default or blank
"Total Style Score",
CALCULATE(SUM(DriverBehaviour[Driver Style Points]), DriverBehaviour),
"Total KM Travelled",
CALCULATE(SUM(DriverBehaviour[Trip Distance Final]), DriverBehaviour),
"Infringements Count",
CALCULATE(
COUNTROWS(
FILTER(
InfringementData,
InfringementData[Penalty Type] = "Speeding or Red light Camera"
)
),
RELATEDTABLE(DriverBehaviour)
)
)
Thanks for the response @amitchandak
Whilst this did result in every month being displated regardless of data, Unfortunately it also resulted in just the first name to appear per month.
I will create a sample pbix file and respond shortly.
User | Count |
---|---|
131 | |
71 | |
70 | |
58 | |
54 |
User | Count |
---|---|
194 | |
95 | |
65 | |
62 | |
53 |