Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Good Morning,
I'm fairly new to Power BI, and trying to do something which appears simple, but for some reason is not working.
I'm using a Sharepoint list to log events, which can be seperated into two categories: "Master Cautions" and "Internal events", along with a date field.
I have managed to create two DAXs which count the events for each category.
When plotting either DAX against the time field, it works fine, however when I attempt to display both on a line chart, I get an error " Error fetching data for this visual".
I have tried looking for an explanation online, but nothing seems to explain it.
I would appreciate any help.
Below are the two DAX formulae:
MasterCautionCount =
COALESCE(
COUNTROWS(
FILTER(
'Duty Manager Event Log',
'Duty Manager Event Log'[EventType] = "Master Caution"
)
),
0
)
Internal Event Count =
COALESCE(
COUNTROWS(
FILTER(
'Duty Manager Event Log',
'Duty Manager Event Log'[EventType] = "Internal Event"
)
),
0
)
Thank you
Solved! Go to Solution.
Hi @Michael85 -Hope in in your model the tables : Duty Manager Event Log table is properly related to a dedicated date table in your model. if you dont have date table, please create it .
calculated table FYR:
DateTable =
ADDCOLUMNS(
CALENDAR(DATE(2020, 1, 1), DATE(2030, 12, 31)),
"Year", YEAR([Date]),
"Month", FORMAT([Date], "MMM"),
"MonthNumber", MONTH([Date]),
"Quarter", "Q" & QUARTER([Date]),
"Weekday", FORMAT([Date], "dddd")
)
Modify your measures to include the date context for proper alignment on the line chart.
MasterCautionCount =
CALCULATE(
COUNTROWS('Duty Manager Event Log'),
'Duty Manager Event Log'[EventType] = "Master Caution"
)
Another measure for internal events:
InternalEventCount =
CALCULATE(
COUNTROWS('Duty Manager Event Log'),
'Duty Manager Event Log'[EventType] = "Internal Event"
)
The original measures did not explicitly include any relationship to the date field, which led to Power BI being unable to group the counts by date when combining both measures. Pleae create it and let us know if still issue exist.
Proud to be a Super User! | |
Hi @Michael85 -Hope in in your model the tables : Duty Manager Event Log table is properly related to a dedicated date table in your model. if you dont have date table, please create it .
calculated table FYR:
DateTable =
ADDCOLUMNS(
CALENDAR(DATE(2020, 1, 1), DATE(2030, 12, 31)),
"Year", YEAR([Date]),
"Month", FORMAT([Date], "MMM"),
"MonthNumber", MONTH([Date]),
"Quarter", "Q" & QUARTER([Date]),
"Weekday", FORMAT([Date], "dddd")
)
Modify your measures to include the date context for proper alignment on the line chart.
MasterCautionCount =
CALCULATE(
COUNTROWS('Duty Manager Event Log'),
'Duty Manager Event Log'[EventType] = "Master Caution"
)
Another measure for internal events:
InternalEventCount =
CALCULATE(
COUNTROWS('Duty Manager Event Log'),
'Duty Manager Event Log'[EventType] = "Internal Event"
)
The original measures did not explicitly include any relationship to the date field, which led to Power BI being unable to group the counts by date when combining both measures. Pleae create it and let us know if still issue exist.
Proud to be a Super User! | |
Thank you @rajendraongole1
It appears it was an issue with the Date Field.
I was able to resolve it.
Thanks again
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.