cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hebavarkey Frequent Visitor
Frequent Visitor

Issue with DAX filter using a measure created

Hi Team, I am new to Power BI. For a customer report we are using the direct query option as we  require real time data refresh and have complex secuirty implementations in the platform side. For a specific report we were trying to create filtered table using DAX Filter as 

latestsnapshottable = Filter(OriginalTable;OriginalTable[SnapshotId]=[MAXSnapShotID])

MAXSnapShotID is a measure we have created as calculate(max(OriginalTable[SnapshotId]))

This is giving the error of over running the 1 million row limitation. However we used  the Card Visual to see value for the MAXSnapShotID. Its showing a value. However when i hardcoded the dax filter as latestsnapshottable = Filter(OriginalTable;OriginalTable[SnapshotId]=[value seen in the card visual]). This is working fine and records are being extracted. 

Request your support here .  Also would like to know if we can see the queries being run on the data source when we apply the dax filter.

Many thanks in advance. 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: Issue with DAX filter using a measure created

Hi @hebavarkey 

 

Coz they are the indifferent context in your formula:

I'd suggest you use below measure instead:

[MAXSnapShotID] =MAXX(ALL('OriginalTable'),[SnapshotId])
then
latestsnapshottable = Filter(OriginalTable;OriginalTable[SnapshotId]=[MAXSnapShotID])

Or:

latestsnapshottable = var a = MAX('OriginalTable'[SnapshotId])
Return Filter(OriginalTable;OriginalTable[SnapshotId]=a)
Community Support Team _ Dina Ye
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

hebavarkey Frequent Visitor
Frequent Visitor

Re: Issue with DAX filter using a measure created

Thank You. It worked

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Issue with DAX filter using a measure created

Hi @hebavarkey 

 

There is a 1 million row limit for returning data using DirectQuery. This does not affect aggregations or calculations used to create the dataset returned using DirectQuery, only the rows returned. For example, you can aggregate 10 million rows with your query that runs on the data source, and accurately return the results of that aggregation to Power BI using DirectQuery as long as the data returned to Power BI is less than 1 million rows. If more than 1 million rows would be returned from DirectQuery, Power BI returns an error.

 

You can use the DAX studio to capture queries in power bi, please refer to the blog: https://www.sqlbi.com/articles/capturing-power-bi-queries-using-dax-studio/

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Highlighted
hebavarkey Frequent Visitor
Frequent Visitor

Re: Issue with DAX filter using a measure created

Can you please help me understand why we are unable to  create filtered table using DAX Filter as 

 

latestsnapshottable = Filter(OriginalTable;OriginalTable[SnapshotId]=[MAXSnapShotID])

 

MAXSnapShotID is a measure we have created as calculate(max(OriginalTable[SnapshotId]))

 

This is giving the error of over running the 1 million row limitation. However we used  the Card Visual to see value for the MAXSnapShotID. Its showing a value. However when i hardcoded the dax filter as latestsnapshottable = Filter(OriginalTable;OriginalTable[SnapshotId]=[value seen in the card visual]). This is working fine and records are being extracted. 

Community Support Team
Community Support Team

Re: Issue with DAX filter using a measure created

Hi @hebavarkey 

 

Coz they are the indifferent context in your formula:

I'd suggest you use below measure instead:

[MAXSnapShotID] =MAXX(ALL('OriginalTable'),[SnapshotId])
then
latestsnapshottable = Filter(OriginalTable;OriginalTable[SnapshotId]=[MAXSnapShotID])

Or:

latestsnapshottable = var a = MAX('OriginalTable'[SnapshotId])
Return Filter(OriginalTable;OriginalTable[SnapshotId]=a)
Community Support Team _ Dina Ye
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

hebavarkey Frequent Visitor
Frequent Visitor

Re: Issue with DAX filter using a measure created

Thank You. It worked

View solution in original post

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors