cancel
Showing results for
Did you mean:
Highlighted
Frequent Visitor

Measures insert into 2D table

Hi All,

I have a bunch of measures, which are fairly complex in creation.

i.e. Perform maths on a table, selecting certain rows / values to create travel times based on a bunch of average speeds.

Now I have 6 Measures (will be more soon), Road 1 Travel Time By Car, Road 1 Travel Time By Cycle, Road 1 Travel Time By Walk, Road 2 Travel Time By Car, Road 2 Travel Time By Cycle, Road 2 Travel Time By Walk.

I want to be able to show them in a 2D table / matrix + a label for the road name.

Road Name, Car Travel Time, Cycle Travel Time, Walk Travel Time

Road 1       , 5 mins             ,   8 mins                 , 19 mins

Road 2      , 4 mins               , 7 mins                 , 15 mins

My Issue is that I cant seem to visualise / group my measures into rows, when i am adding them to tables / matrixs they end up in one long row.

Any help would be appreciated.

I am thinking i might want to:

- import my measures into a new source table so I can group them by rows,

- Use a visualisation tool which i havent found which allows me to display the measure where I want in a table view.

As a back up i can use a bunch of cards and place them where I want, but this looses the ability to scroll.

Aiden

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV

Re: Measures insert into 2D table

Probably use a variation of the disconnected table trick. In general, to use a measure in that way, you need to use the Disconnected Table Trick as this article demonstrates: https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...

So, have your Roads in a table, use that for your rows. Create a measure using your existing measures and SWITCH to determine which measure to show.

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Proud to be a Super User!

3 REPLIES 3
Highlighted
Super User IV

Re: Measures insert into 2D table

Probably use a variation of the disconnected table trick. In general, to use a measure in that way, you need to use the Disconnected Table Trick as this article demonstrates: https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...

So, have your Roads in a table, use that for your rows. Create a measure using your existing measures and SWITCH to determine which measure to show.

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Proud to be a Super User!

Highlighted
Frequent Visitor

Re: Measures insert into 2D table

Perfect thanks,

Knew it would be fairly easy once i found the right key word!

My code for the car column

Car Travel Time =
IF(
// This first IF condition forces the measure to evaluate in the context of the visual
// This next condition avoids getting the error that the visual cannot be displayed
// This switch statement uses the values from our Attendance slicer to determine which measure to display
SWITCH(
),
// If the Attendance slicer has not been selected, just display the date of the training
"-"
)
, "-")
Super easy, NOTE that the example given doesnt have the false result for the first if so i had to add that simply enough for me was to have a dash.

BR,

Aiden

Highlighted
Super User IV

Re: Measures insert into 2D table

Awesome!

---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Proud to be a Super User!

Announcements

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors