The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello!
I have two tables, table A: SetReorderPoint(Sept), it has all the item no with category "set"
table B:Item_SetOrCalculate, it has more items no than table A, no category in this table, but I am creating a column to show the catefory. If the item no I can find from table A, show "set" under table B category, otherwise showed "Calculate" under table B catogory. I wrote the DAX below but it kept showing wrong. Can anyone help please?
====================================================================================
Solved! Go to Solution.
Hi @Shineccx007
Based on your needs, I have created the following table
You can use the following dax to achieve what you want
New Column =
IF(
ISBLANK(LOOKUPVALUE('SetReorderPoint(Sept)'[category], 'SetReorderPoint(Sept)'[index], 'Item_SetOrCalculate'[index])),
"calculate",
"set"
)
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Under table B will all items with category updated. I now have table C and 😧
For "set" items I need to vlookup the fixed quantity from table C, but for "calculate" items I need to get the data from calculation from table D.
What DAX shall I write. Any suggestion?
Hi @Shineccx007
Based on your needs, I have created the following table
You can use the following dax to achieve what you want
New Column =
IF(
ISBLANK(LOOKUPVALUE('SetReorderPoint(Sept)'[category], 'SetReorderPoint(Sept)'[index], 'Item_SetOrCalculate'[index])),
"calculate",
"set"
)
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Under table B will all items with category updated. I now have table C and 😧
For "set" items I need to vlookup the fixed quantity from table C, but for "calculate" items I need to get the data from calculation from table D.
What DAX shall I write. Any suggestion?
Hi Jay,
Your explaination worked! Thank you so much!
@Shineccx007 What is wrong? Can you provide sample information? I often have better luck using MAXX(FILTER(...),...) instead of LOOKUPVALUE. Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, 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.
Hi Greg,
Table A: SetReorderPoint(Sept), Item no from 1 to 10, category all is "set"
Table B:Item_SetOrCalculate, Item no from 1 to 50, no category column. I wanted to add one more column in this table. If the item no show on Table A, category is "set", else showed calculate.
What shall I write the DAX?
Table B
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
19 | |
18 | |
15 | |
11 |
User | Count |
---|---|
35 | |
34 | |
19 | |
19 | |
14 |