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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
rena9994
Frequent Visitor

Display two rows with multiple column values

I have three tables in my model: resultProcess As T1 visual (PK: ProcessID), resultWorkflow As T2 visual (FK: ProcessID, WorkflowNr), resultFeatureCount As T3 visual (FK: ProcessID, WorkflowNr). resultProcess table has zero to many workflows in resultWorkflow and resultFeatureCount tables

 

When I choose a row in T1 visual, T2 rows (127 rows) gets filtered based on relationships. Currently, T3 is not related to any table and I used the filter pane to show what I wanted to accomplish.

 

In T2 visual (Test Results by Workflow), the rows are filtered by ProcessID. Each process have no more than 127 workflow numbers (1-127)

 

My problem is in T3 visual (Test Results by Workflows with Feature Counts). Assuming there's a relationship with T1, when I pick on a row in T2, T3 gets filtered with its related ProcessID and WorkflowNr row in T3. When I click on the COMPARE button, I'd like to show the static Baseline row for the corresponding WorkflowNr selected in T2. This is the boxed row in T3 visual.

 

I'm looking for suggestions on how to implement this. Baseline rows are also on T3 and they have a Baseline attribute value = Yes. I was thinking of just moving this attribute value from Baseline to ProcessID attribute but the challenge is when I slice with a row on T2, only one row gets picked on T3.  It can be as simple as selecting a row in T2 and the baseline and test result of the corresponding workflow are next to each other in T3 only. Unlike what I show where all the workflows are visible.

PBI question.png

After I have the two rows on T3, I'd like to highlight the deltas on each column with conditional formatting.

 

1 ACCEPTED SOLUTION
v-zhenbw-msft
Community Support
Community Support

Hi @rena9994 ,

 

We create a sample and you can refer this way,

 

1. Delete the relationship between resultProcess and resultFeatureCount.

 

Dis 1.jpg

 

2. Then we can create a measure in resultFeatureCount table.

 

Measure = 
var selected_ = MIN('resultProcess'[ProcessID])
var max_name = MAXX(FILTER(ALLSELECTED('resultFeatureCount'),'resultFeatureCount'[ProcessID]=selected_),'resultFeatureCount'[name])
return
CALCULATE(SUM(resultFeatureCount[value]),FILTER('resultFeatureCount', 'resultFeatureCount'[name]=max_name))

 

The result like this,

 

Dis 2.jpg

 

Dis 3.jpg

 

If it doesn’t meet your requirement, could you please provide a mockup sample  based on fake data or describe the fields of each tables and the relations between tables simply?

 

It will be helpful if you can show us the exact expected result based on the tables.

 

Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.

BTW, pbix as attached.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-zhenbw-msft
Community Support
Community Support

Hi @rena9994 ,

 

We create a sample and you can refer this way,

 

1. Delete the relationship between resultProcess and resultFeatureCount.

 

Dis 1.jpg

 

2. Then we can create a measure in resultFeatureCount table.

 

Measure = 
var selected_ = MIN('resultProcess'[ProcessID])
var max_name = MAXX(FILTER(ALLSELECTED('resultFeatureCount'),'resultFeatureCount'[ProcessID]=selected_),'resultFeatureCount'[name])
return
CALCULATE(SUM(resultFeatureCount[value]),FILTER('resultFeatureCount', 'resultFeatureCount'[name]=max_name))

 

The result like this,

 

Dis 2.jpg

 

Dis 3.jpg

 

If it doesn’t meet your requirement, could you please provide a mockup sample  based on fake data or describe the fields of each tables and the relations between tables simply?

 

It will be helpful if you can show us the exact expected result based on the tables.

 

Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.

BTW, pbix as attached.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the sample PBIX and your reply.  Your sample provides the answer on how to solve my problem. If I understood it correctly, one can filter a table based on a selected filter that is passed to a measure. While your sample did not exactly answer my problem, it gave me the path to the solution. Thanks again! I'll see if I can do it myself. 

I tried to build the measure but can't seem to get it right.

 

Below I show what I want to accomplish. When I select ProcessID in the slicer, below happens:

  1. Yellow highlights - [Test Runs] and [Test workflow] visuals are filtered by 'ProcessId' 
  2. Pink highlights - In the [Results] table, a measure called Slicer assigns a value '0' for rows where (Baseline = 'Yes') or (ProcessID = selected (ProcessID)) in the slicer (e.g. 1068)
  3. Blue highlights - [Workflows - Baseline vs Results] table visual - [Results] table - is filtered by Slicer value = '0' based on Visual filter.er 

 

Annotation 2020-06-05 143654.png

Greg_Deckler
Super User
Super User

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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