March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I am trying to perform a "level of detail" calculation.
In the example below, I want the "Modified_DC" field to display "MX05" for all rows, based on the Ship_From_DC where Master_Item = Material_ID.
I believe this can be done using eithe ALLSELECTED or ALLEXCEPT, but I haven't been able to figure this out.
Solved! Go to Solution.
Hi,
Thanks for the solution parry2k offered, and i want to offer some more information for user to refer to.
hello @cbschley, you can create the following calculated column.
Modified_DC =
VAR a = [MASTER ITEM]
VAR b = [LOCATIONID]
RETURN
CALCULATE (
MAX ( 'Table'[SHIP_FROM_DC] ),
FILTER ( 'Table', 'Table'[MASTERALID] = a && 'Table'[LOCATIONID] = b )
)
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Thanks for the solution parry2k offered, and i want to offer some more information for user to refer to.
hello @cbschley, you can create the following calculated column.
Modified_DC =
VAR a = [MASTER ITEM]
VAR b = [LOCATIONID]
RETURN
CALCULATE (
MAX ( 'Table'[SHIP_FROM_DC] ),
FILTER ( 'Table', 'Table'[MASTERALID] = a && 'Table'[LOCATIONID] = b )
)
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@cbschley yes, if you are planning to add it as a column, better to add at the source (always a best practice to bring data as upstream as possible, and as close to the source). That would be a proper solution.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@cbschley try this measure:
Modified_DC =
CALCULATE (
MAX ( Table2[Ship_from_DC] ),
FILTER (
ALLSELECTED ( Table2 ),
Table2[Master_Item] = Table2[Material_Id]
),
VALUES ( Table2[Master_Item] )
)
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @parry2k , I tried that, its now giving me a single value, but not the correct one. I would expect this to display "MX05" for that column:
Are you adding this as a measure or a column? It is a measure.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
I am trying to add it as a column, because I need to create joins on this new column. Perhaps its best I just bring it up to the DB layer to avoid any issues.
Hi,
Share data in a format that can be pasted in an MS Excel file. Show the expected result there.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
94 | |
86 | |
82 | |
76 | |
49 |
User | Count |
---|---|
160 | |
144 | |
103 | |
74 | |
57 |