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
Hey 🙂
I am having some troubles writting a DAX querie for my purpose.
I have a table with the following columns: IDofPurchase, Supplier, Fraccionated. In the fraccionated column i wrote the code in order for it to return the value "Close" if purchase orders have the same supplier and "Okay" if it doesnt.
Now, i need another column where if the value of Fraccionated is "Close", it groups de purchase orders with the same supplier. For example:
I want to create the column Group. Can anyone help me, please?
Thanks 🙂
Solved! Go to Solution.
Hi @asofiacgraca ,
According to your description, here's my solution. Create a measure.
Column =
VAR _Rank =
RANKX (
FILTER ( 'Table', 'Table'[Fraccionated] = "Close" ),
'Table'[Supplier],
,
ASC,
DENSE
)
RETURN
IF ( [Fraccionated] = "Okay", "Okay", "Group" & _Rank )
Get the correct result:
I attach my sample below for your reference.
Best regards,
Community Support Team_yanjiang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @asofiacgraca ,
According to your description, here's my solution. Create a measure.
Column =
VAR _Rank =
RANKX (
FILTER ( 'Table', 'Table'[Fraccionated] = "Close" ),
'Table'[Supplier],
,
ASC,
DENSE
)
RETURN
IF ( [Fraccionated] = "Okay", "Okay", "Group" & _Rank )
Get the correct result:
I attach my sample below for your reference.
Best regards,
Community Support Team_yanjiang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey, that's perfect!
Thanks 🙂