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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
RMtechm
Frequent Visitor

country wise Yes/No

Hi Team,

as attached example i want to show in which country that perticular application is used insted of count want to see if it is used then "Yes" or else "No".

RMtechm_0-1671447283048.png

 

Thanks in advance.

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @RMtechm ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want.

1. Handle with it in Power Query Editor just as below screenshot

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8i8tycnPz1bSUTKCYkMkDEGGllAaIhyrE63kGuHs6qPglpmTiqLSCFWfKZwJ1hSUmptSiRDChsxhal2SUhPLUotwqUMz2TexuDizAr/RpjDF/kWJyWB3G2FVZ4xqtGtAgGcEfpNNYGqLU4vKMpNTFfzyy1ENQkWGSMY7+/jiUobskFgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"ERP/App" = _t, Benin = _t, #"Cote d'lvoire" = _t, Eswatini = _t, Ghana = _t, Group = _t, #"Group RAFM" = _t, Liberia = _t, Nigeria = _t, Rwanda = _t, SA = _t, Zambia = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ERP/App", type text}, {"Benin", Int64.Type}, {"Cote d'lvoire", Int64.Type}, {"Eswatini", Int64.Type}, {"Ghana", Int64.Type}, {"Group", Int64.Type}, {"Group RAFM", Int64.Type}, {"Liberia", Int64.Type}, {"Nigeria", Int64.Type}, {"Rwanda", Int64.Type}, {"SA", Int64.Type}, {"Zambia", Int64.Type}}),
    #"Replaced Value" = Table.ReplaceValue(#"Changed Type",null,0,Replacer.ReplaceValue,{"Benin", "Cote d'lvoire", "Eswatini", "Ghana", "Group", "Group RAFM", "Liberia", "Nigeria", "Rwanda", "SA", "Zambia"}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Replaced Value", {"ERP/App"}, "Attribute", "Value"),
    #"Added Custom" = Table.AddColumn(#"Unpivoted Other Columns", "IsUsed", each if [Value]<>0 then "Yes" else "No"),
    #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Value"})
in
    #"Removed Columns"

yingyinr_0-1671522126597.png

2. Create a matrix visual

yingyinr_1-1671522215050.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And it is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
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

2 REPLIES 2
RMtechm
Frequent Visitor

Thanks for solution.

v-yiruan-msft
Community Support
Community Support

Hi @RMtechm ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want.

1. Handle with it in Power Query Editor just as below screenshot

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8i8tycnPz1bSUTKCYkMkDEGGllAaIhyrE63kGuHs6qPglpmTiqLSCFWfKZwJ1hSUmptSiRDChsxhal2SUhPLUotwqUMz2TexuDizAr/RpjDF/kWJyWB3G2FVZ4xqtGtAgGcEfpNNYGqLU4vKMpNTFfzyy1ENQkWGSMY7+/jiUobskFgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"ERP/App" = _t, Benin = _t, #"Cote d'lvoire" = _t, Eswatini = _t, Ghana = _t, Group = _t, #"Group RAFM" = _t, Liberia = _t, Nigeria = _t, Rwanda = _t, SA = _t, Zambia = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ERP/App", type text}, {"Benin", Int64.Type}, {"Cote d'lvoire", Int64.Type}, {"Eswatini", Int64.Type}, {"Ghana", Int64.Type}, {"Group", Int64.Type}, {"Group RAFM", Int64.Type}, {"Liberia", Int64.Type}, {"Nigeria", Int64.Type}, {"Rwanda", Int64.Type}, {"SA", Int64.Type}, {"Zambia", Int64.Type}}),
    #"Replaced Value" = Table.ReplaceValue(#"Changed Type",null,0,Replacer.ReplaceValue,{"Benin", "Cote d'lvoire", "Eswatini", "Ghana", "Group", "Group RAFM", "Liberia", "Nigeria", "Rwanda", "SA", "Zambia"}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Replaced Value", {"ERP/App"}, "Attribute", "Value"),
    #"Added Custom" = Table.AddColumn(#"Unpivoted Other Columns", "IsUsed", each if [Value]<>0 then "Yes" else "No"),
    #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Value"})
in
    #"Removed Columns"

yingyinr_0-1671522126597.png

2. Create a matrix visual

yingyinr_1-1671522215050.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And it is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.