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
erikzzy
Helper II
Helper II

use mesure as filter. but doesn't work.

Hello everyone,

 

I want to use one measure recent as filter. My power bi use DirectQuery. So I can't use calculate or maxx to add one calculated column.

As the first print screen, I want to only keep recent = 0.

erikzzy_0-1594335488540.png

 

So I add recent in filter section. Then I choose  recent is 0.

erikzzy_1-1594335546143.png

Recent is a measure for choose the most recent record. 

 

erikzzy_3-1594335676228.png

 

 

Finally, the result is blank. 

erikzzy_2-1594335582466.png

 

Thanks a lot!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@erikzzy , Seem like you need data when created at = updated at individual table

 

calculate([Recent],report[createdate]=report[updatedat])
or
calculate([Recent],filter(report,report[createdate]=report[updatedat]))

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@erikzzy , Seem like you need data when created at = updated at individual table

 

calculate([Recent],report[createdate]=report[updatedat])
or
calculate([Recent],filter(report,report[createdate]=report[updatedat]))

Hello @amitchandak,

 

Thanks your reply, 

I have tried your solution. 

erikzzy_0-1594349471982.png

If I use measure 2 to filter, my table is blank like this,

erikzzy_1-1594349561840.png

 And  I can't understand what do you meaning in an individual table. I need a new table only one measure [recent]?

Thank you again,

ErikZhang

 

AiolosZhao
Memorable Member
Memorable Member

Hi @erikzzy ,

 

I have a workaround for you, if your table only has this measure.

 

Then you can try to create another measure or change the recent to the below one:

 

if recent = 0, 0, blank()

 

And I think the table will show what you want.

 

Please try.

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @AiolosZhao ,

 

Thanks your reply.

I try your solution. But in fact there lastDate is another measure. So my table do not work.
I have tried your proposition,

erikzzy_1-1594349296612.png

 

erikzzy_0-1594349146622.png

 

Hi @erikzzy ,

 

Could you please show some sample data and the result that you want in a screenshot or excel?

 

Thanks.

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks your reply. I found a problem of data modelling.  

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.