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
hi, what is the dax formula so that first column is earliest column with values and second column is the last column with values. For example, for first row is "Degree" and "Other Degree" and last second row is "Degree" and "Honours".
Thanks
Solved! Go to Solution.
Hi @Kathir ,hello @audreygerred Thank you for your prompt reply!
For your requirement, we can create two measures as shown below:
FirstNonBlankColumn =
SWITCH(
TRUE(),
'Table'[Degree]<>BLANK(),'Table'[Degree],
'Table'[Bachelor]<>BLANK(), 'Table'[Bachelor],
'Table'[Honours]<>BLANK(), 'Table'[Honours],
'Table'[Master]<>BLANK(), 'Table'[Master],
'Table'[Doctorate]<>BLANK(), 'Table'[Doctorate],
'Table'[PhD]<>BLANK(), 'Table'[PhD],
'Table'[Other Degree]<>BLANK(), 'Table'[Other Degree],
BLANK()
)
LastNonBlankColumn =
SWITCH(
TRUE(),
'Table'[Other Degree]<>BLANK(), 'Table'[Other Degree],
'Table'[PhD]<>BLANK(), 'Table'[PhD],
'Table'[Doctorate]<>BLANK(), 'Table'[Doctorate],
'Table'[Master]<>BLANK(), 'Table'[Master],
'Table'[Honours]<>BLANK(), 'Table'[Honours],
'Table'[Bachelor]<>BLANK(), 'Table'[Bachelor],
'Table'[Degree]<>BLANK(),'Table'[Degree],
BLANK()
)
Result:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Kathir ,hello @audreygerred Thank you for your prompt reply!
For your requirement, we can create two measures as shown below:
FirstNonBlankColumn =
SWITCH(
TRUE(),
'Table'[Degree]<>BLANK(),'Table'[Degree],
'Table'[Bachelor]<>BLANK(), 'Table'[Bachelor],
'Table'[Honours]<>BLANK(), 'Table'[Honours],
'Table'[Master]<>BLANK(), 'Table'[Master],
'Table'[Doctorate]<>BLANK(), 'Table'[Doctorate],
'Table'[PhD]<>BLANK(), 'Table'[PhD],
'Table'[Other Degree]<>BLANK(), 'Table'[Other Degree],
BLANK()
)
LastNonBlankColumn =
SWITCH(
TRUE(),
'Table'[Other Degree]<>BLANK(), 'Table'[Other Degree],
'Table'[PhD]<>BLANK(), 'Table'[PhD],
'Table'[Doctorate]<>BLANK(), 'Table'[Doctorate],
'Table'[Master]<>BLANK(), 'Table'[Master],
'Table'[Honours]<>BLANK(), 'Table'[Honours],
'Table'[Bachelor]<>BLANK(), 'Table'[Bachelor],
'Table'[Degree]<>BLANK(),'Table'[Degree],
BLANK()
)
Result:
Best regards,
Joyce
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You can rearrange the order of the columns in Power Query.
Proud to be a Super User! | |
no i need a formular such that i can sieve out the two values from all columns in data view
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |