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

Make the Card visual display current values

Hello,

 

I hope you can help me.

 

I have a measure for the Total Head Count for terminated  - 

Terminated = IF ( COUNT ( AllTerminated[Last Date Worked] ) = BLANK (), 0, COUNT ( AllTerminated[Last Date Worked] ) )

 

I'm trying to make the Card display only the current count for the year not the total but would also need to change when selecting  a year or years in the slicer.

 

Thank you!

1 ACCEPTED SOLUTION

@PatrickLamoste you second measure need change or you can club both in one, double check the syntax/table names, might be typo

 

Terminated Selected Year = 
VAR selectedYear = SELECTEDVALUE( AllTerminated[Termination Year], YEAR(TODAY()))

RETURN
CALCULATE(
COUNT(Allterminated[Last Date Worked]),
AllTerminated[Termination Year] = selectedYear
)

 



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.

View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@PatrickLamoste are you looking to have year slicer on the page, and if no value selected then use current year otherwise use year from slicer?

 

If that is the case you can add a measure to get year selected, if not selected then default to current year 

 

selectedYear = SELECTEDVALUE( Table[year], YEAR(TODAY() )

once you have year, you can update your count measure and filter data on "selectedyear" measure.



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.

Yes, that is exactly how I want the Card to function. Thank you I will give it a whirl.

@PatrickLamoste sounds good. feel free to reach out if need assistance.



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.

Hello,

 

I can't seem to make it work.

 

Here is my Selected Year Measure

 

image.png

 

And here is my Filter

 

image.png

 

Am I missing something here? I am fairly new to PBI.

 

Thanks!

@PatrickLamoste you second measure need change or you can club both in one, double check the syntax/table names, might be typo

 

Terminated Selected Year = 
VAR selectedYear = SELECTEDVALUE( AllTerminated[Termination Year], YEAR(TODAY()))

RETURN
CALCULATE(
COUNT(Allterminated[Last Date Worked]),
AllTerminated[Termination Year] = selectedYear
)

 



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.

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.