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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
PowerUser123
Helper II
Helper II

Line and Stacked Column Chat - Show Months with no Values?

My data is pretty simple like this:

 

PowerUser123_3-1623149021159.png

 

 

I have a measure that counts every row that is not the USA Region: 

Measure = CALCULATE(COUNT('Table (2)'[Region]),FILTER('Table (2)','Table (2)'[Region]<>"USA"))

 

I want to put the data above into a Line and Stacked Column Chart. The column values should be my measure above. The column series would be region. However, I'd like a line value that shows a count of all rows by month (so do not exclude USA region).

 

When I do this simply, the following is the result:

PowerUser123_1-1623148714425.png

It doesn't show January or April as those months only had the USA region in them. 

 

How can I change a measure or something to have the line values show up in January and April? I know I can right-click the calendar on the axis and click show items with no data, but that's not an ideal solution because then the following graph is the result:

 

PowerUser123_2-1623148962580.png

Then, I would have to go and manually choose specific months/years to include which makes the visual not dynamic at all.

 

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @PowerUser123 ,

 

Based on your description, you only need to delete the filter condition in the formula.

Measure = COUNT('Table (2)'[Region])

 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@PowerUser123 , This what I tried in past for date range using date table

 

0 between range
Measure = var _1= SUM(Opportunity[Opportunity count]) +0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.