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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
qmestu
Helper IV
Helper IV

Divide function with missing values

Hi

I have the following data:

valueyearcategory
721752011A
717092012A
706712014A
703692015A
701032016A
699222017A
698282018A
697762019A
699152020A
698502021A
104202011B
104202012B
104202018B

 

I also have 2 measures:

A=calculate(average(table[value]),table[category]="A")

B=calculate(average(table[value]),table[category]="B")

 

I need a 3rd measure:

C=calculate(divide([b],[a]))

 

This works as expected, except when B has no values, the visual that has the C measure shows 0% instead of no value. I've tried setting the alternate result of divide to 0,"" or blank() and nothing seems to work. Ideally it would need to show no value. The years are on a second table, that is connected to the table above with a single direction link.

 

Thanks.

1 ACCEPTED SOLUTION
Idrissshatila
Super User
Super User

@qmestu ,

 

did you try to enable the show items with no data on the year field ?

 

Idrissshatila_0-1681817843641.png

 

If I answered your question, please mark my post as solution so it would appeare to others, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




View solution in original post

3 REPLIES 3
Idrissshatila
Super User
Super User

@qmestu ,

 

did you try to enable the show items with no data on the year field ?

 

Idrissshatila_0-1681817843641.png

 

If I answered your question, please mark my post as solution so it would appeare to others, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Idrissshatila
Super User
Super User

Hello @qmestu ,

 

did you try this C=calculate(divide([b],[a], "No value" ))

If I answered your question, please mark my post as solution so it would appeare to others, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Even if this would work, it would show "no value" on the chart, which isn't what i need. I need it to show the year but without any value. Thanks.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors