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
Allan77
New Member

Changing Data Structure

I am trying to take my data from the structure in pic1 to the structure in pic2. Would anyone be able to point me in the right direct to accomplish this?

pic 1.jpgpic 2.jpg

1 ACCEPTED SOLUTION

Thats awesome, thanks for your help!

View solution in original post

4 REPLIES 4
mattbrice
Solution Sage
Solution Sage

You want that in a visual?  then just put 'Service' in columns, 'Date' in rows.

 

You want that in the data model?  Then you need to look at the Query Editor, Transform, Pivot Column step.

 

But your pic1 structure is ideal for Data Modeling/Dax...

I have found that pic 1 data structure is restictive. By examply if I want to do a measure to sum up all Service 1 totals it wouldnt work as it wants a column name. Maybe Im missing something?

 

The structure in  pic 2 is the data structure that I thought I needed and not what I want in a visual.

 

Thanks

 

Dax filters works on columns so the below is what you would do. 

 

Service 1 Total =
CALCULATE ( SUM ( Table[Value] ), Table[Service] = "Service1" )

Thats awesome, thanks for your help!

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.