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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Grab Max row and corresponding date for each device

Hi

 

How can i get a static table that isnt affected by filter slivers which gives me a 1 row per each device based on the highest view and date that occured.

 

DevicesViewsDate
   
Mobile351/6/2020
Computer251/7/2020
Tablet201/2/2020
Tablet101/1/2020
Computer561/2/2020
Mobile211/3/2020

 

Fiinal Output would be:

DevicesViewsDate
Mobile351/6/2020
Tablet201/2/2020
Computer561/2/2020
1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

According to your description,I think you can create a measure, then use it in filter pane.

Like this:

Measure =
IF (
    VALUES ( 'Table'[Views] )
        = MAXX (
            FILTER ( ALL ( 'Table' ), [Devices] = SELECTEDVALUE ( 'Table'[Devices] ) ),
            [Views]
        ),
    1,
    0
)

5.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

4 REPLIES 4
v-janeyg-msft
Community Support
Community Support

Hi, @Anonymous 

 

According to your description,I think you can create a measure, then use it in filter pane.

Like this:

Measure =
IF (
    VALUES ( 'Table'[Views] )
        = MAXX (
            FILTER ( ALL ( 'Table' ), [Devices] = SELECTEDVALUE ( 'Table'[Devices] ) ),
            [Views]
        ),
    1,
    0
)

5.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

parry2k
Super User
Super User

@Anonymous ok, gotcha. Try these measures:

 

Highest Value = 
CALCULATE ( MAX ( 'Table'[Amt] ), TOPN ( 1, ALLEXCEPT ( 'Table', 'Table'[Devoce] ), CALCULATE (  MAX ( 'Table'[Amt] ) ), DESC ) ) 

Highest Date = 
CALCULATE ( MAX ( 'Table'[Date] ), TOPN ( 1, ALLEXCEPT ( 'Table', 'Table'[Devoce] ), CALCULATE ( MAX ( 'Table'[Amt] ) ), DESC ) ) 

 

Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Anonymous in your output, you have given the wrong result for computer, anyhow add these two measures:

 

Highest Date = CALCULATE ( MAX ( 'Table'[Date] ), ALLEXCEPT ( 'Table', 'Table'[Devoce] ) ) 

Value on Highest Date = 
VAR __date = [Highest Date]
RETURN
CALCULATE ( MAX ( 'Table'[Amt] ), ALLEXCEPT ( 'Table', 'Table'[Devoce] ), 'Table'[Date] = __date )

 

Change table and column name as per your model.

 

Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hi, it is not based on highest date though i need it based off of highest VIEWS. And then be able to grab the data associated with the highest views. 

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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