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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Card showing latest Period in a Range

Hi, Im trying to put a card that shows only the lastest period in a selected range from a Slicer. 

In the example, I wanna show just the value for Q2-2018 because is the latest period selected for the graph. 

 

Captura de pantalla 2018-10-22 a la(s) 2.39.07 p. m..png

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

hi, @Anonymous

After my test, you could use this way

Step1:

Add a Year Qtr Column

Year Qtr = YEAR('Date'[Date])*10+INT ( FORMAT ( 'Date'[Date], "q") ) 

Step2:

Drag this field into card visual level filter and set filter Top1

6.JPG

Result:

7.JPG

Best Regards,

Lin

 

 

 

 

Community Support Team _ Lin
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

6 REPLIES 6
v-lili6-msft
Community Support
Community Support

hi, @Anonymous

After my test, you could use this way

Step1:

Add a Year Qtr Column

Year Qtr = YEAR('Date'[Date])*10+INT ( FORMAT ( 'Date'[Date], "q") ) 

Step2:

Drag this field into card visual level filter and set filter Top1

6.JPG

Result:

7.JPG

Best Regards,

Lin

 

 

 

 

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

Now I have a problem with a measure.... QoQ demand growth, 

Crec. Demanda Trim. =
VAR __PREV_QUARTER =
CALCULATE(
SUM('Demanda y Precios'[Demanda Mes (GWh)]);
DATEADD('Calendar'[Date];-4; QUARTER)
)
RETURN
DIVIDE(
SUM('Demanda y Precios'[Demanda Mes (GWh)]) - __PREV_QUARTER;
__PREV_QUARTER;0
)

 

If I use it in a card with the proposed Visual filter.... appears "blank" sometime, or "error"

Anonymous
Not applicable

Works fine.... thanks!!!

chotu27
Post Patron
Post Patron

@Anonymous 

 

Step 1 : Go to Visual Level Filter for Card

Step 2 :  And Drag Date column to Visual level filter of Card
Step 3 :  Select Relative Date Filtering and filter it as you wanted 

date.PNG

Greg_Deckler
Super User
Super User

No sample data so can't be super specific but use VAR to get the MAX of your [Date] and then FILTER down to that value within something like a MAXX or SUMX.

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks,

 

The time data are a monthly column in a table Calendar.[Date] with a relationship in the 'Demanda y Precios' table. It is used in the Hierarchy Slicer to select Quarters. 

 

The values that I wanna show in the card are 'Demanda y Precios'[PIB] (Quartely data), and 'Demanda y Precios'[Crec. Demanda Trim] (calculated column), both of them are shown in the table in the red circle in the image. 

 

I tryed:

Last PIB = CALCULATE(SUM('Demanda y Precios'[PIB]);Filter('Demanda y Precios';'Demanda y Precios'[Fecha]=MAX('Demanda y Precios'[Fecha])))

 

But [Last PIB] is blank.  

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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