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
Vishnoo
Employee
Employee

How to display 0 percent of grand total

I have the below model and two measures. Both table have a one to Many relationship.

 

Fruits Support TableFruits Support Table

 

Fruits TableFruits Table

FruitsSold 2018 = (CALCULATE(SUM(Fruits[Qty]), Fruits[Sold Year] = 2018)) +0
FruitsSold 2018 = (CALCULATE(SUM(Fruits[Qty]), Fruits[Sold Year] = 2018)) +0

 

 

Here is my visual.

visual.JPG

Now, when i apply a filter on Name, the % of grand total is coming blank. I want to display them as Zero like how it displays when it is not filterred. How to acheive this. Thanks.

 

visual with filter.JPG

 

 

1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi Vishnoo,

 

It’s not supported to make some setting directly to display the %GT FruitSold 2019 column or %GT FruitSold 2018 column as "0.00%" to interact some selections in slicer, when you create the %GT FruitSold 2019 as the way in picture below.

 

1.png 

 

 

 

 

 

 

 

 

 

 

To work around the issue, you can create some columns and measures to implement your demand.

 

From your description, I create sample data to reproduce the scenario. Firstly, create columns TotalSold 2018 and TotalSold 2019 to get total fruit Qty for each year.

 

TotalSold 2018 = CALCULATE(SUM(Fruits[Qty]),FILTER(Fruits,Fruits[Sold Year]=2018))

TotalSold 2019 = CALCULATE(SUM(Fruits[Qty]),FILTER(Fruits,Fruits[Sold Year]=2019))

 

Create measures %GT FruitSold 2018 and %GT FruitSold 2019 to get percentage of each fruit in total fruit Qty for each year.

 

%GT FruitSold 2018 = VALUE(DIVIDE([FruitsSold 2018],MAX(Fruits[TotalSold 2018])))

%GT FruitSold 2019 = VALUE(DIVIDE([FruitsSold 2019],MAX(Fruits[TotalSold 2019])))

 

Then, choose the columns %GT FruitSold 2018 and %GT FruitSold 2019 ,and click "%" setting 2 decimal under Modeling ribbon,

 

3.jpg 

 

 

 

 

Finally, when you make some selections in slicer, return the result showing below picture.

 

4.jpg 

 

 

 

Here is my test pbix file link: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EYQiQwA7gIlOpM6Tlv...

 

Best Regards,

Amy

 

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

1 REPLY 1
v-xicai
Community Support
Community Support

Hi Vishnoo,

 

It’s not supported to make some setting directly to display the %GT FruitSold 2019 column or %GT FruitSold 2018 column as "0.00%" to interact some selections in slicer, when you create the %GT FruitSold 2019 as the way in picture below.

 

1.png 

 

 

 

 

 

 

 

 

 

 

To work around the issue, you can create some columns and measures to implement your demand.

 

From your description, I create sample data to reproduce the scenario. Firstly, create columns TotalSold 2018 and TotalSold 2019 to get total fruit Qty for each year.

 

TotalSold 2018 = CALCULATE(SUM(Fruits[Qty]),FILTER(Fruits,Fruits[Sold Year]=2018))

TotalSold 2019 = CALCULATE(SUM(Fruits[Qty]),FILTER(Fruits,Fruits[Sold Year]=2019))

 

Create measures %GT FruitSold 2018 and %GT FruitSold 2019 to get percentage of each fruit in total fruit Qty for each year.

 

%GT FruitSold 2018 = VALUE(DIVIDE([FruitsSold 2018],MAX(Fruits[TotalSold 2018])))

%GT FruitSold 2019 = VALUE(DIVIDE([FruitsSold 2019],MAX(Fruits[TotalSold 2019])))

 

Then, choose the columns %GT FruitSold 2018 and %GT FruitSold 2019 ,and click "%" setting 2 decimal under Modeling ribbon,

 

3.jpg 

 

 

 

 

Finally, when you make some selections in slicer, return the result showing below picture.

 

4.jpg 

 

 

 

Here is my test pbix file link: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EYQiQwA7gIlOpM6Tlv...

 

Best Regards,

Amy

 

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.