Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Show x-axis values when no y-axis value is available

I have a data set similar to the one below. I would like to show date in the x-axis and event1 in the y-axis. As you see, there is not a event1 value for each date value, but I would like to see them all, event if no data is available. See screenshots below for clarification. 

 
I need to do this when the variable in the x-axis is both categorical and continuous. Can you please provide solutions for both? 
 
Thanks a lot
 
Untitled2.pngUntitled.png
1 ACCEPTED SOLUTION
AnthonyTilley
Solution Sage
Solution Sage

create a new measure and use an if statment to replace blanks with zeros

 

Event1Line = 
var ev1 = sum('Table'[Event1])
var ret = if(ev1 = BLANK(),0,ev1)
return ret

top line is using just to event1 colunm the second is a new line using the measure above

 

lines.png





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
AnthonyTilley
Solution Sage
Solution Sage

create a new measure and use an if statment to replace blanks with zeros

 

Event1Line = 
var ev1 = sum('Table'[Event1])
var ret = if(ev1 = BLANK(),0,ev1)
return ret

top line is using just to event1 colunm the second is a new line using the measure above

 

lines.png





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.