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, I have this code to feed a table when toggle = true or False. The toggle name is: LbVisible.
If ( LbVisible.Value = false;
Sort( Filter( INCO_REQUESTS; Status = "Submitted for Action" And Request_Type <> "NO TARIFF" And IsBlank(Email) ); Submitted_Time; Ascending );
Sort( Filter( INCO_REQUESTS; Status = "Submitted for Action" And IsBlank(Email) ); Submitted_Time; Ascending )
)
Now i would like to add Distinct value only, cause right now, i have duplicated rows.
How can i do that?
Thank you
For distinct, use below
If ( LbVisible.Value = false;
Sort(Distinct(Filter( INCO_REQUESTS; Status = "Submitted for Action" And Request_Type <> "NO TARIFF" And IsBlank(Email) )); Submitted_Time; Ascending );
Sort( Distinct(Filter( INCO_REQUESTS; Status = "Submitted for Action" And IsBlank(Email) )); Submitted_Time; Ascending )
)
For some reason, the minute I add "Distinct", that's when I get an error. If I remove the Distinct portion of the code you gave me, it works perfectly. I will try again and get back to you, but for now, no luck.
I tried again, and when I add the Distinct code piece, I still receive the same errors:
I'm confused as to why this is happening.
Use this
If ( LbVisible.Value = false;
Distinct(Sort( Filter( INCO_REQUESTS; Status = "Submitted for Action" And Request_Type <> "NO TARIFF" And IsBlank(Email) ); Submitted_Time; Ascending );"Result");
Distinct(Sort( Filter( INCO_REQUESTS; Status = "Submitted for Action" And IsBlank(Email) ); Submitted_Time; Ascending )
;"Result"))
For some reasons, i'm still having all those errors
What if i use First and groupBy to replace the Distinct?
Ex:
First(
Filter(
INCO_REQUESTS,
Status = "Submitted for Action" And Request_Type <> "NO TARIFF" And IsBlank(Email)
)
)It gives me the first record only, but if i group by 2 columns value, would that also do it?
Ex: Group by "From" and "To" columns?
Would i have to put my GroupBy at the beginning?
I think i was able to make it work like this:
GroupBy(
Filter(
INCO_REQUESTS,
Status = "Submitted for Action" And Request_Type <> "NO TARIFF" And IsBlank(Email)
),
"From",
"To"
), but i will continue to test
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.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |