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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply

How to make pivot table in power bi as same as excel

I have such data

SunnyRKFOODLAND_0-1667027689548.png

I want it to be like this in power bi so that i can use flow map and use count as width

SunnyRKFOODLAND_1-1667028014174.png

how can i do it help me 

 

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

Hi @SunnyRKFOODLAND ,

 

Use group by feature in Power Query Editor:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKk4t0DUyUtJRyi7NS8nJBDJK8/IS85VidUaiXGJGbmpKYlJiyqg8Vvns/JzsxJJEymRjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Month = _t, #"veh location" = _t, #"income location" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Month", type date}, {"veh location", type text}, {"income location", type text}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Month", "veh location", "income location"}, {{"Count", each Table.RowCount(_), Int64.Type}})
in
    #"Grouped Rows"

vjaywmsft_0-1667380223466.png

 

Best Regards,

Jay

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

View solution in original post

4 REPLIES 4
v-jayw-msft
Community Support
Community Support

Hi @SunnyRKFOODLAND ,

 

Use group by feature in Power Query Editor:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WKk4t0DUyUtJRyi7NS8nJBDJK8/IS85VidUaiXGJGbmpKYlJiyqg8Vvns/JzsxJJEymRjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Month = _t, #"veh location" = _t, #"income location" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Month", type date}, {"veh location", type text}, {"income location", type text}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Month", "veh location", "income location"}, {{"Count", each Table.RowCount(_), Int64.Type}})
in
    #"Grouped Rows"

vjaywmsft_0-1667380223466.png

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
AbbasG
Memorable Member
Memorable Member

@SunnyRKFOODLAND In Power BI you can use the Matrix visual to get the desired output.

AbbasG_0-1667050765739.png

 

yes. but I want to use that as a table in the flow map ( Visual Addin) to show A to B traveeling frequency. using matrix can i do that?

lukiz84
Memorable Member
Memorable Member

YourMeasure = COUNT('Table'[Income Location])

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.