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.
Hi,
I'm wondering why these 100% shown here. In my original dataset, I don't have such value for these category.
Solved! Go to Solution.
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?
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 @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.
To solve this, just clear the slicer and the result may like this:
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.
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%...
Hi @YunJ ,
Try modifying your measure as follows:
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?
Best looks,
Yingjie Li
If this post helps, please consider Accepting it as the solution to help other members find it more quickly.
Hi @YunJ ,
Try modifying your measure as follows:
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?
Best looks,
Yingjie Li
If this post helps, please consider Accepting it as the solution to help other members find it more quickly.
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?
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.
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
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as 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 C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi @AllisonKennedy I don't want it shown as 0, if there is no value it should not show..
@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
Please check the pbix file. Thanks a lot! https://www.dropbox.com/s/yfc5nahof16iow8/test0513.pbix?dl=0
I found that because there "1-......" in my calculation. so there are 100% bars. But how to solve this...?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
95 | |
77 | |
65 | |
53 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |