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

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.

Reply
ivandgreat
Helper II
Helper II

Summarized by Month Bar Chart

Hi,

 

I'm a newbie in using power bi. Seeking some support to resolve my issues on my table.

I have a table that has the achieved and target values per month on the column header.

How could I summarize it by month by selecting or using a slicer and able to get the running results by month.

 

PO NoPO ValueJan AchJan TarFeb AchFeb TarMar AchMar Tar
AAA-1100   20 20
AAA-250010020050300  
BBB-11000  200300500400

 

 

Thanks in advance.

1 REPLY 1
lbendlin
Super User
Super User

You do this by unpivoting the source data.  Ideally you would also provide something better than "Jan"  - for example "202201" 

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcnR01DVU0lEyNDAAkgpI2MgAwYjVgag0AnJNwSoh6o3ApCmIMEYyAKTcyckJZrABiqkIxRCTTIBkbCwA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"PO No" = _t, #"PO Value" = _t, #"Jan Ach" = _t, #"Jan Tar" = _t, #"Feb Ach" = _t, #"Feb Tar" = _t, #"Mar Ach" = _t, #"Mar Tar" = _t]),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"PO No", "PO Value"}, "Attribute", "Value")
in
    #"Unpivoted Other Columns"

 

And while you're at it you would probably also want to normalize your data to keep the PO details separate from the target/achieved facts, and then you will want to add a Calendar table to your data model.

 

You can achieve the cumulative value by using Quick Measures.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors