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.
Hi, i have a table with number of days and i would like to display a sentence based on another table
It's easy to do this with VLOOKUP in Excel, but in DAX, how to do ?
Solved! Go to Solution.
Hi @coollehavre,
You can try to use below formula to create a calculate column to search the range label from other table.
Range = VAR day_index = MAXX ( FILTER ( ALL ( 'TableB'), 'TableB'[Days] < EARLIER ( 'TableA'[Days] ) ), [Days] ) RETURN LOOKUPVALUE ( 'TableB'[Range], 'TableB'[Days], day_index )
Regards,
Xiaoxin Sheng
Hi @coollehavre,
You can try to use below formula to create a calculate column to search the range label from other table.
Range = VAR day_index = MAXX ( FILTER ( ALL ( 'TableB'), 'TableB'[Days] < EARLIER ( 'TableA'[Days] ) ), [Days] ) RETURN LOOKUPVALUE ( 'TableB'[Range], 'TableB'[Days], day_index )
Regards,
Xiaoxin Sheng
Try this:
= LOOKUPVALUE ( TableB[Libelle], TableB[Delai], VALUES ( TableA[Delai] ) )
This will be a MEAUSURE, not a calculated column. If you want a column, you can do this:
= LOOKUPVALUE ( TableB[Libelle], TableB[Delai], TableA[Delai] )
You don't need the VALUES() function in the calculated column because you have a row context in Table A to get you the right value in the [Delai] column. In the measure, you need VALUES() to get the proper scalar value from [Delai] column based on the current filter context.
Hope this helps!
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |