cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Juramirez Member
Member

Show items with no data in switch function

Hi all!

 

I just did these steps and them works fine ( I named the result column as ColumnWithSpanishMonths).

Then, I'm doing a Bar chart (Axis=ColumnWithSpanishMonths, Values=Count of value x) , the Axis field has marked the option Show items with no data but there are some months that doesn't have a value in Values Field and my Bar chart doesn't show them. How can I fix this? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-ljerr-msft Super Contributor
Super Contributor

Re: Show items with no data in switch function

Hi @Juramirez,

 

Just use the formula below to create a measure to calculate the Count of WorkerID, then show the measure as Values, MonthEspañol as Axis on the Chart. Smiley Happy

Measure = COUNTA(Data[WorkerID]) + 0

m1.PNGr1.PNG

 

Here is the modified pbix file for your reference. 

 

Regards

10 REPLIES 10
ChrisHaas Established Member
Established Member

Re: Show items with no data in switch function

What is the formula for your measure?

 

Sometimes adding a +0 at the end of the formual will force the value to be 0 instead of blank, and then it will show up on the graph.

Juramirez Member
Member

Re: Show items with no data in switch function

Hi @ChrisHaas

 

I don't have a formula for my measure, it just count the values. I tried to do that and it doesn't work. The formula is in the axis value and it's used to bring the months of date in Spanish.

v-ljerr-msft Super Contributor
Super Contributor

Re: Show items with no data in switch function

Hi @Juramirez,

 

Could try using the formula below to create a measure to calculate the Count of value x, then show the measure as ValuesColumnWithSpanishMonths as Axis on the Chart to see if it works in your scenario? Smiley Happy

Measure = COUNTA ( 'Table1'[ColumnX] ) + 0

Remark: You'll need to replace 'Table1'[ColumnX] with your real table name and column name.

 

Regards

Juramirez Member
Member

Re: Show items with no data in switch function

Hi @v-ljerr-msft

 

I just did that and it stays the same. Anyone can solve this? I can't see how Smiley Sad

 

Thanks! 

v-ljerr-msft Super Contributor
Super Contributor

Re: Show items with no data in switch function

Hi @Juramirez,

 

Could you share a sample pbix file(with just some sample/mock data) which can reproduce the issue, so that we can further assist on this issue? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading. Smiley Happy

 

Regards

Juramirez Member
Member

Re: Show items with no data in switch function

Hi @v-ljerr-msft

 

I was busy, sorry for my delay. 

Here is the example: https://drive.google.com/open?id=0B8dgHywU59SkSVRyaDJocEhLMkk 

The problem is with the Group4, it doesn't have any value on count of Worker ID in "Marzo" but I want that it shows all the months on the bar chart. Any help is appreciated.

 

Thanks

v-ljerr-msft Super Contributor
Super Contributor

Re: Show items with no data in switch function

Hi @Juramirez,

 

The file link provided above is not available to me. Could you reshare the sample pbix file? Smiley Happy

 

iss.PNG

 

Regards

Juramirez Member
Member

Re: Show items with no data in switch function

v-ljerr-msft Super Contributor
Super Contributor

Re: Show items with no data in switch function

Hi @Juramirez,

 

Just use the formula below to create a measure to calculate the Count of WorkerID, then show the measure as Values, MonthEspañol as Axis on the Chart. Smiley Happy

Measure = COUNTA(Data[WorkerID]) + 0

m1.PNGr1.PNG

 

Here is the modified pbix file for your reference. 

 

Regards