Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I am trying to create a DAX column or measure (not sure which would be best) and I'm not sure of the best way of doing this.
If the value in the Standard Service Code column is blank, I want the DAX mesaure to returns the first Standard Service Code from another row with the same document number.
So in the second and third rows in the picture below, the new measure/column would give you the standard service code of the first row (as all three rows have the same Document No_). Hope that makes sense? Any thoughts on the best way to do this?
Solved! Go to Solution.
Hi,
According to your description, i create a simple table to test:
Please try to create this calculated column:
Column = IF('Table'[Standard Service Code]=BLANK(),CALCULATE(MAX('Table'[Standard Service Code]),ALLEXCEPT('Table','Table'[Document No])),'Table'[Standard Service Code])
And the result shows:
Hope this helps.
Best Regards,
Giotto Zhi
Couldn't you also do a fill down in the query?
This is how I acheived it in Excel (see last column Test), using this formula:
=IF(A2=A1,E1,C2)
I just don't know how to translate that to DAX 😞
Hi,
According to your description, i create a simple table to test:
Please try to create this calculated column:
Column = IF('Table'[Standard Service Code]=BLANK(),CALCULATE(MAX('Table'[Standard Service Code]),ALLEXCEPT('Table','Table'[Document No])),'Table'[Standard Service Code])
And the result shows:
Hope this helps.
Best Regards,
Giotto Zhi
Try
std service code = minx(filter(table,table[document_no]=earlier(table[document_no]) && not(isblank(table[standrad service code]))),table[standrad service code])
OR
std service code = minx(filter(table,table[document_no]=earlier(table[document_no]) && not(isblank(earlier(table[standrad service code])))),table[standrad service code])
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin
Thanks for the suggestion, but sadly, neither of these work.
Here are my 2 attempts and a screen shot of the results.
Can you share sample data. If possible please share a sample pbix file after removing sensitive information.Thanks.
My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
Hi,
Does the solution in the post below give you the result you're after?
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 June 2024 Power BI update to learn about new features.
User | Count |
---|---|
93 | |
87 | |
80 | |
69 | |
68 |
User | Count |
---|---|
226 | |
129 | |
119 | |
83 | |
77 |