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
vikashkarra
Helper I
Helper I

DAX HELP?

Hello - trying to see if this is possible to do:

 

Date                          Category                 Minutes

7/1/2016                    Lobby                     2

7/1/2016                    Bar                          1

7/3/2016                    Restaurant              3

7/2/2016                    Front Desk              2

7/2/2016                    Lobby                      10

 

What I'd like is to have a new table that basically has this:

 

Date                  Category               Minutes

7/1/2016            Lobby, Bar, Gym         5

7/2/2016            Front Desk, Lobby       12

 

Is this something that can be done?

 

 

2 ACCEPTED SOLUTIONS

Measure = CONCATENATEX ( VALUES ( Data[Place Name (standardized)]), Data[Place Name (standardized)], ", " )

 

looks like I got it - validating as we speak, but I think that calculated measure gives me what I want -

 

Thanks!!

View solution in original post

Ha, glad you found it! I was just coming back to post something similar to create the table:

 

New Table = SUMMARIZE(
TableName,
TableName[Date],
"Category List", CONCATENATEX(TableName, TableName[Category], ", "),
"Sum Minutes", SUM(TableName[Minutes])
)

 

View solution in original post

5 REPLIES 5
vikashkarra
Helper I
Helper I

Date                          Category                 Minutes

7/2/2016                    Gym                       2

7/1/2016                    Lobby                     2
7/1/2016                    Bar                          1
7/3/2016                    Restaurant              3
7/2/2016                    Front Desk              2
7/2/2016                    Lobby                      10

 

Sorry, that is the table that I'm trying to use DAX to derive:

 

Date                  Category               Minutes
7/1/2016            Lobby, Bar, Gym         5
7/2/2016            Front Desk, Lobby       12

Hi @vikashkarra. It's difficult to tell from your sample what you're wanting to do. It looks like you're creating groups on your categories, but for 7/1 in your end table it contains Lobby, and so does 7/2 in a different group.

 

If you're trying to show every category that appeared on that day, the Gym doesn't show up on 7/1 in your first table, but does in your second. Should Gym be on the 7/2 line, and Restaurant be on a 7/3 line by itself?

 

 

Date                          Category                 Minutes
7/2/2016                    Gym                       2
7/1/2016                    Lobby                     2
7/1/2016                    Bar                          1
7/3/2016                    Restaurant              3
7/2/2016                    Front Desk              2
7/2/2016                    Lobby                      10
 
Sorry, that is the table that I'm trying to use DAX to derive:
 
Date                  Category                          Minutes
7/1/2016            Lobby, Bar                       3

7/2/2016          Gym, Front Desk, Lobby   14

7/3/2016          Restaurant                          3

 

Sorry KGrice - this is what the desired output is!

Measure = CONCATENATEX ( VALUES ( Data[Place Name (standardized)]), Data[Place Name (standardized)], ", " )

 

looks like I got it - validating as we speak, but I think that calculated measure gives me what I want -

 

Thanks!!

Ha, glad you found it! I was just coming back to post something similar to create the table:

 

New Table = SUMMARIZE(
TableName,
TableName[Date],
"Category List", CONCATENATEX(TableName, TableName[Category], ", "),
"Sum Minutes", SUM(TableName[Minutes])
)

 

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.