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.
I'm having trouble getting a good results here for either a measure or a new calculated table. I have two joined tables with ID and priority fields. The first table will ahve multiple values for the same ID and the other table will have one. I need to look across both tables and then return the lowest value by ID. I don't care whether it's a new table or measure to get the result. Example below:
Table1:
ID Priority
123 | 1 |
123 | 2 |
123 | 3 |
456 | 3 |
456 | 3 |
456 | 4 |
Table2:
ID Priority
123 | 4 |
456 | 2 |
Desired Result:
ID Priority
123 | 1 |
456 | 2 |
Solved! Go to Solution.
Hi @Anonymous,
Other solutions.
1. Add a calculated column in Table 2.
Column = MIN ( CALCULATE ( MIN ( 'Table1'[Priority] ) ), [Prority] )
2. A measure with the 'Table 2'[ID] in a Table visual.
Measure = MIN ( MIN ( 'Table1'[Priority] ), MIN ( 'Table2'[Prority] ) )
Best Regards,
Dale
Hi,
Using the Query Editor, append data from both tables to create a new table. Now in your visual, drag the ID and write this measure
=MIN(Data[Priority])
Hope this helps.
@Ashish_Mathur wrote:
Using the Query Editor, append data from both tables to create a new table. Now in your visual, drag the ID and write this measure
=MIN(Data[Priority])
Might be easier with this rational to do
Measure = CALCULATE ( MINX ( UNION ( Table1, Table2 ), [Priority] ) )
Hi,
A calculate function should not be required in your formula.
You're right, it's implicit.
Hi @Anonymous,
Other solutions.
1. Add a calculated column in Table 2.
Column = MIN ( CALCULATE ( MIN ( 'Table1'[Priority] ) ), [Prority] )
2. A measure with the 'Table 2'[ID] in a Table visual.
Measure = MIN ( MIN ( 'Table1'[Priority] ), MIN ( 'Table2'[Prority] ) )
Best Regards,
Dale
Thanks Dale!
As a calculated table, you can do it like this:
Table = GROUPBY( UNION( Table1, Table2 ), Table1[ID], "Priority", MINX( CURRENTGROUP(), [Priority] ) )
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |