Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
ineedham
Helper I
Helper I

How can I hide groups that contain one blank or zero value when using Custom Visual Tornado Chart

When using the tornado chart custom visual, is there an easy way to hide any group in which one of the values is 0 or blank?

 

For instance, in the example below, how can I make it so January and June values don't even show up in the visualization (without having to filter them out one by one)?

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@ineedham,

In your scenario, calculate average of Annual Salary in Query Editor, then pivot columns, exclude 0 from the dataset and unpivot columns as the following sample. After, create Tornado again.

1, Original Tornado chart.
0.JPG

2. Pivot columns in Query Editor.
1.JPG

3. Exclude 0 from the dataset.
2.JPG3.JPG

4. Unpivot columns.
4.JPG
5.JPG

5. Create Tornado chart again.
6.JPG

 

The above steps generated the code in Advanced Editor, you can test it in your Power BI Desktop.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("bY9BCoUwDESvUgp/ZyRJG6sXcOcJxIVgd/o/eP/Fb8EipVkNzEuYmXW1y35G21kagEJSxz2i+dite9EINCXloUGMwD4pVqaAy+bUnDsBn0loiBeQTNoIEbN/D3P97ljzOV51dRYNPuUpKLDUJ6fBZwbWdtkwKi9lhZal79j+", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Legend = _t, Group = _t, Percentage = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Legend", type text}, {"Group", type text}, {"Percentage", type number}}),
    #"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Legend]), "Legend", "Percentage", List.Sum),
    #"Filtered Rows" = Table.SelectRows(#"Pivoted Column", each ([Male] <> 0) and ([Female] <> 0)),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Filtered Rows", {"Group"}, "Attribute", "Value")
in
    #"Unpivoted Columns"

Regards,
Lydia

View solution in original post

3 REPLIES 3
JayHerrera
Advocate I
Advocate I

@ineedham - one way would be to use the "Visual Level Filters" and set each to display values greater than zero.  See screenshot for example.

 

2017-09-06_17-47-39.png

Thanks. I tried that, but it doesn't work with my specific data. I'm using the tornado to do a gender pay gap analysis. So, I'm averaging salaries of multiple employees.

 

The Group is the specific position, the Legend is gender, and the Values are the Avg. of the Annual Salary.  Each left bar represents the avg salary of women who hold that position, and the right bar represents the avg salary of men who hold that same position.  Filtering any of these fields to be greater than 0 or not blank doesn't get rid of the blank categories.

 

tornado.PNG

Anonymous
Not applicable

@ineedham,

In your scenario, calculate average of Annual Salary in Query Editor, then pivot columns, exclude 0 from the dataset and unpivot columns as the following sample. After, create Tornado again.

1, Original Tornado chart.
0.JPG

2. Pivot columns in Query Editor.
1.JPG

3. Exclude 0 from the dataset.
2.JPG3.JPG

4. Unpivot columns.
4.JPG
5.JPG

5. Create Tornado chart again.
6.JPG

 

The above steps generated the code in Advanced Editor, you can test it in your Power BI Desktop.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("bY9BCoUwDESvUgp/ZyRJG6sXcOcJxIVgd/o/eP/Fb8EipVkNzEuYmXW1y35G21kagEJSxz2i+dite9EINCXloUGMwD4pVqaAy+bUnDsBn0loiBeQTNoIEbN/D3P97ljzOV51dRYNPuUpKLDUJ6fBZwbWdtkwKi9lhZal79j+", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Legend = _t, Group = _t, Percentage = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Legend", type text}, {"Group", type text}, {"Percentage", type number}}),
    #"Pivoted Column" = Table.Pivot(#"Changed Type", List.Distinct(#"Changed Type"[Legend]), "Legend", "Percentage", List.Sum),
    #"Filtered Rows" = Table.SelectRows(#"Pivoted Column", each ([Male] <> 0) and ([Female] <> 0)),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Filtered Rows", {"Group"}, "Attribute", "Value")
in
    #"Unpivoted Columns"

Regards,
Lydia

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors