Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi all,
I need some help to figure this out. in my table, i have ID and Step Type. Each id can have multiple steps. i want to show yes for each duplicate id if it matches my condition. for example i have the following:
| ID | Step Type |
| 1 | A |
| 1 | C |
| 2 | F |
| 3 | B |
| 3 | C |
I want to add a column that if step = C then it shows "yes" for each ID and "No" if it doesn't.
Expected result should look like this:
| ID | Step Type | Result |
| 1 | A | Yes |
| 1 | C | Yes |
| 2 | F | No |
| 3 | B | Yes |
| 3 | C | Yes |
Can someone please help with this.
Thanks
Hetal
Solved! Go to Solution.
Hi @hpatel24779
You can use DAX formula:
The pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Hi @hpatel24779
You can use DAX formula:
The pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Hi @hpatel24779
Did you download the PBIX file I attached and try to compare it with what you're doing?
If not, it's worth downloading and checking.
If you did, and it’s not working, it probably means the script is not exactly as described in the question.
Please save your PBIX file to some public cloud and share it via a link, excluding sensitive data.
Sorry jumped the gun, this is actually not working as intended
Create a calculated column
Result =
IF(
CALCULATE(
COUNTROWS(FILTER('Table', 'Table'[ID] = EARLIER('Table'[ID]) && 'Table'[Step Type] = "C")),
ALLEXCEPT('Table', 'Table'[ID])
) > 0,
"Yes",
"No"
)
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Hi @Kedar_Pande, i tried your method but when entering the line countrows(filter('Table','Table'[ID] = Earlier('Table'[ID], i don't see the table after earlier( if this makes sense?
Please share a simplified version of your PBIX file (in English) without sensitive data. You can upload it to a public cloud service like OneDrive, Google Drive, or Dropbox and share the link. This will help in understanding your data structure and the issue, allowing for more precise guidance.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |