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 Team,
I have base table as below
Code | Region | Sales |
123 | 10 | |
123 | ABC | 20 |
456 | 30 | |
456 | DEF | 40 |
I have created a Distinct value from code as below
Code |
123 |
456 |
I need to create allokup region column from the base as below.
If the value if blank in region it should look for next value.
Code | Region |
123 | ABC |
456 | DEF |
Thanks in advance !
Solved! Go to Solution.
Try this:
Try this:
hi @Raks
try to create a calculated table like this:
Table =
SUMMARIZE(
BaseTable,
BaseTable[Code],
BaseTable[Region]
)
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end
https://dropmefiles.com/eahTZ
To create the "Allokup Region" column, you can use the DAX formula "CALCULATE" with "IF" and "MIN" functions. Here's the formula:
Allokup Region = CALCULATE(MIN(Base[Region]), FILTER(Base, Base[Code]=DistinctCodes[Code] && NOT(ISBLANK(Base[Region]))))
Assuming your base table is named "Base" and your distinct code table is named "DistinctCodes", you can use this formula in a new calculated column. The formula finds the minimum non-blank value of the "Region" column for each code.
This code is not working as expected plz find below images. 131 code should have value but in lookup table I still see blank.
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 |
---|---|
115 | |
100 | |
88 | |
68 | |
61 |
User | Count |
---|---|
152 | |
120 | |
102 | |
87 | |
68 |