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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
BMFormation
New Member

UnPivot DAX

Hello,

 

I am looking for a project, according to a number of months between 2 dates, resources in a matrix (see illustration)

 

PBIQ.JPG

 

I thought about doing either doing a benchmark query to build the projection, but maybe there is a DAX  solution that would be faster for volume management ?

 

Do you have any leads?

 

Thank you

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Like this for example:

 

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTLWN9c3MjAyBDINDfSNDWEcAz0QaaQUqxOt5ARkmembwNUZ6hsbwDhGIDOUYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Projet = _t, #"Date prévi début" = _t, #"Date prévi fin" = _t, Direction = _t, #"Chef de projet" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date prévi début", type date}, {"Date prévi fin", type date}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Date", each List.Dates([Date prévi début],1+Duration.Days([Date prévi fin]-[Date prévi début]),#duration(1,0,0,0))),
    #"Expanded Date" = Table.ExpandListColumn(#"Added Custom", "Date")
in
    #"Expanded Date"

"Total"  is a measure 

Total = AVERAGE(Projets[Chef de projet])+AVERAGE(Projets[Direction])

lbendlin_0-1618879011217.png

 

 

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

Like this for example:

 

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTLWN9c3MjAyBDINDfSNDWEcAz0QaaQUqxOt5ARkmembwNUZ6hsbwDhGIDOUYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Projet = _t, #"Date prévi début" = _t, #"Date prévi fin" = _t, Direction = _t, #"Chef de projet" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Date prévi début", type date}, {"Date prévi fin", type date}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Date", each List.Dates([Date prévi début],1+Duration.Days([Date prévi fin]-[Date prévi début]),#duration(1,0,0,0))),
    #"Expanded Date" = Table.ExpandListColumn(#"Added Custom", "Date")
in
    #"Expanded Date"

"Total"  is a measure 

Total = AVERAGE(Projets[Chef de projet])+AVERAGE(Projets[Direction])

lbendlin_0-1618879011217.png

 

 

many thanks 👌 👏

lbendlin
Super User
Super User

Not sure what this has to do with time intelligence, but in a matrix visual  you can choose to show your measures "on rows" to achieve the desired visual output.

Thank you

but how to go from the 1st table to the 2nd table?

With powerQuery?

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.