cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

Why there is always 100% bar?

Hi,

I'm wondering why these 100% shown here. In my original dataset, I don't have such value for these category.

 

Capture.PNG

Capture.PNG

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User II
Super User II

UPDATE: @YunJ  sorry, forgot the 1- part, so have updated this below, if you want it shown as blank, then try: 

MEASURE =

VAR calc = CALCULATE(SUM(.....)

RETURN

IF(ISBLANK(calc),BLANK(), 1- calc)

 

Do you want it to be 0 instead? Try putting the CALCULATE part of the function into a VAR:

 

MEASURE =

VAR calc = CALCULATE(SUM(.....)

RETURN

IF(ISBLANK(calc),0, 1- calc)

 

Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved. 

 

If you found this post helpful, please give Kudos.

I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 

https://sites.google.com/site/allisonkennedycv

 


______________


Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved. 


If you found this post helpful, please give Kudos.


I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 


excelwithallison.com

View solution in original post

Community Support
Community Support

Hi @YunJ ,

Try to modify your measure like this:

PA depth_LS =
VAR _PA =
    1
        - CALCULATE (
            SUM ( 'Depth Analysis-pbi'[PSP_LS] ),
            FILTER ( 'Depth Analysis-pbi', 'Depth Analysis-pbi'[Type] = "Livestream" )
        )
            / CALCULATE (
                SUM ( 'Depth Analysis-pbi'[RSP] ),
                FILTER ( 'Depth Analysis-pbi', 'Depth Analysis-pbi'[Type] = "Livestream" )
            )
RETURN
    IF ( _PA = 1, BLANK (), _PA )

Is this your expected result?

filter result.png

Best Regards,
Yingjie Li

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

10 REPLIES 10
Post Prodigy
Post Prodigy

I found that because there "1-......" in my calculation. so there are 100% bars. But how to solve this...?

Super User IV
Super User IV

@YunJ , have checked your calculation in table visual. I doubt either join is missing. or some problem with the formula. Can not tell without looking at data



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Super User II
Super User II

UPDATE: @YunJ  sorry, forgot the 1- part, so have updated this below, if you want it shown as blank, then try: 

MEASURE =

VAR calc = CALCULATE(SUM(.....)

RETURN

IF(ISBLANK(calc),BLANK(), 1- calc)

 

Do you want it to be 0 instead? Try putting the CALCULATE part of the function into a VAR:

 

MEASURE =

VAR calc = CALCULATE(SUM(.....)

RETURN

IF(ISBLANK(calc),0, 1- calc)

 

Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved. 

 

If you found this post helpful, please give Kudos.

I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 

https://sites.google.com/site/allisonkennedycv

 


______________


Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved. 


If you found this post helpful, please give Kudos.


I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 


excelwithallison.com

View solution in original post

Please check the pbix file. Thanks a lot!  https://www.dropbox.com/s/yfc5nahof16iow8/test0513.pbix?dl=0

 

 

 

Community Support
Community Support

Hi @YunJ ,

Based on my test, the measure you have created has nothing problem. The reason causes this issue is that you have selected slicer as "202002" while there is no data about viya in 202002 about 'Haircare' for example so that you will get 100% using this measure.

old.pngtable.png

To solve this, just clear the slicer and the result may like this:

new.png

In conclusion, the value 100% is not a wrong value, just have no data about it so that it will show 100%.

 

Best Regards,
Yingjie Li

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

Hi @AllisonKennedy I don't want it shown as 0, if there is no value it should not show..

Thanks @v-yingjl .But I need to choose YearMonth slicer. If there is no Viya value for 202002, then the bar about her should not show rather than shown as 100%...

Community Support
Community Support

Hi @YunJ ,

Try to modify your measure like this:

PA depth_LS =
VAR _PA =
    1
        - CALCULATE (
            SUM ( 'Depth Analysis-pbi'[PSP_LS] ),
            FILTER ( 'Depth Analysis-pbi', 'Depth Analysis-pbi'[Type] = "Livestream" )
        )
            / CALCULATE (
                SUM ( 'Depth Analysis-pbi'[RSP] ),
                FILTER ( 'Depth Analysis-pbi', 'Depth Analysis-pbi'[Type] = "Livestream" )
            )
RETURN
    IF ( _PA = 1, BLANK (), _PA )

Is this your expected result?

filter result.png

Best Regards,
Yingjie Li

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

Thanks a lot! @v-yingjl 

Helpful resources

Announcements
November Update

Check it Out!

Click here to read more about the November 2020 Updates!

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform October Community Highlights

Check out the top community contributors across all of the communities

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors