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,
my table has a lot of zero in several columns:
STOCK IT | STOCK FR | STOCK US | |
SHOES | 10 | 0 | 0 |
SHIRT | 0 | 14 | 0 |
HAT | 0 | 0 | 22 |
GLASSES | 0 | 0 | 0 |
TIE | 33 | 66 | 0 |
SOCKS | 0 | 0 | 45 |
BELT | 0 | 0 | 0 |
How can I obtain the following result in visualization?
STOCK IT | STOCK FR | STOCK US | |
SHOES | 10 | 0 | 0 |
SHIRT | 0 | 14 | 0 |
HAT | 0 | 0 | 22 |
TIE | 33 | 66 | 0 |
SOCKS | 0 | 0 | 45 |
I need to keep only rows with at least one value on several columns.
thank you very much
Paolo
Solved! Go to Solution.
Hi, @paolomint
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure as below.
Visual Control =
var _result =
CALCULATE(
SUM('Table'[Value]),
ALLEXCEPT('Table','Table'[Category])
)
return
IF(
_result>0,
1,0
)
Then you need to put the measure in the visual level filter to get the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @paolomint
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure as below.
Visual Control =
var _result =
CALCULATE(
SUM('Table'[Value]),
ALLEXCEPT('Table','Table'[Category])
)
return
IF(
_result>0,
1,0
)
Then you need to put the measure in the visual level filter to get the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @paolomint ,
Why not create a simple zero check column with conditions and filter on that column.
Refer below image:
Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!
@paolomint
NEW MEASURE =
IF (
CALCULATE(
[MEASURE],
ALLSELECTED(TABLE[COLUMN])
) > 0 ,
[MEASURE],
BLANK()
)
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
thankyou @Fowmy
unfortunatelly, I can not do this way,
if I use the measure you proposed I will have the following result:
STOCK IT | STOCK FR | STOCK US | |
SHOES | 10 | ||
SHIRT | 14 | ||
HAT | 22 | ||
TIE | 33 | 66 | |
SOCKS | 45 |
I need value zero when there is a value on at least one other column, not blank
thank you
paolo
@paolomint
Can you share the measure you used?
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
all the measure are like this:
STOCK IT | STOCK FR | STOCK US | |
SHOES | 10 | ||
SHIRT | 14 | ||
HAT | 22 | ||
TIE | 33 | 66 | |
SOCKS | 45 |
Hi @paolomint
I would create a measure and add all the column in it.
Sum_Measure = [Col1] + [col2] + [Col3] + ...
And create a filter in the filter pane to display when the Sum_Measure is greater than 0.
Hope it resolves your issue? Did I answer your question? Mark my post as a solution! Appreciate your Kudos, Press the thumbs up button!! Linkedin Profile |
@paolomint
This is your Existing Measure, You can replace your calculation
Existing Measure = SUM(DATA[VALUE])+0
Create a new measure which you will uuse in the matrix:
New Measure =
IF (
CALCULATE (
[Existing Measure],
ALLSELECTED (DATA[COUNTRY]))> 0,
[Existing Measure],
BLANK ()
)
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
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 |
---|---|
111 | |
95 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |