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

Replace No Data into values in 100% Stacked

Hi,

 

I want to change no data in 100% Stacked chart into 100%. Example based on this picture

Capture.PNG

So my purpose for Europe itself must be 100% for Yes only. I create a measure and it makes the europe is 50% yes and 50% no.

Is there any way to achieve that?

 

Thanks,

Regards,
Connie

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

HI, @Anonymous 

You could try this way as below:

Step1:

Add a Yes/No fact table and then create the relationship with data table

Step2:

Use conditional measure like this:

Measure = IF(ISBLANK(CALCULATE(SUM('Table'[Value]),ALL('Type'[Type])))=FALSE(),CALCULATE(SUM('Table'[Value])),SUMX(FILTER('Type','Type'[Type]="Yes"),1))

Step3:

Drag Yes/No field from Yes/No fact table instead of data table

Result:

1.JPG

 

here is sample pbix file, please try it.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
v-lili6-msft
Community Support
Community Support

HI, @Anonymous 

You could try this way as below:

Step1:

Add a Yes/No fact table and then create the relationship with data table

Step2:

Use conditional measure like this:

Measure = IF(ISBLANK(CALCULATE(SUM('Table'[Value]),ALL('Type'[Type])))=FALSE(),CALCULATE(SUM('Table'[Value])),SUMX(FILTER('Type','Type'[Type]="Yes"),1))

Step3:

Drag Yes/No field from Yes/No fact table instead of data table

Result:

1.JPG

 

here is sample pbix file, please try it.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-lili6-msft ,

 

Thank you for your replies, so which mean I need to create another table that contains only "Yes" and "No" with the ID (to connect to other tables) is it?

 

 

hi, @Anonymous 

Yes, you need to create another table that contains only "Yes" and "No" like the sample pbix i have attached above.

Refer the pbix file above.

 

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi,

 

Checked already, just wondering since  I have 10 things like that which mean I will create 10 new tables for it.

Is it will make my power bi file become bigger? Or better I do that in the query instead of measure?

hi, @Anonymous 

Just add a fact table with "Yes"/"No" , and since it just a fact table, it does not affect file size much.

 

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-lili6-msft Hi thank you for your reply,

I have same chart but 10 different legend, So it will be new 10 tables and I think will affecting my performance.

But indeed it's good answer if I only have 1 chart for it. But now I have 10 chart and 10 different legend, whic is I will create each legend into 1 table.

 

Thanks

hi, @Anonymous 

You could create each legend into 1 table and it is same logic,

Just try it. Smiley Very Happy

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.