Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

ALL/Groupby/Summerize Dax cannot be used in DirectQuery?

Dear all

 

I am trying to get uniqle combintation of three columns from a table I created by applying DirectQuery from Redshift.

 

Yet, I have tried ALL/GROUPBY/SUMMERIZE but still cannot return a table with all unique combinations.

 

Any idea why? Thank you for your help in advance!

 

duplicate_PBI.JPG 

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

 

We can use two ways to meet your requirement.

  1. Create a measure that count the table rows, and filter out one row data.
count = COUNTROWS('table')
 

31.png

 

  1. Create a calculate table that contains unique data.
Table1 = FILTER(GROUPBY('table','table'[ProductName],'table'[ProductID],'table'[Country]),CALCULATE(COUNTROWS('table'))=1)

 

 

32.png

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

 

We can use two ways to meet your requirement.

  1. Create a measure that count the table rows, and filter out one row data.
count = COUNTROWS('table')
 

31.png

 

  1. Create a calculate table that contains unique data.
Table1 = FILTER(GROUPBY('table','table'[ProductName],'table'[ProductID],'table'[Country]),CALCULATE(COUNTROWS('table'))=1)

 

 

32.png

 

If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
CheenuSing
Community Champion
Community Champion

Hi @Anonymous ,

 

If you are using DirectQuery, can you change your query at the source to retun only distinct values of the 3 columns. 

 

You can not do this after the loading of data.

 

Cheers

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.