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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Create Card of newest value per date selected

hello i have 2 tables

attendance:

IdNameDateClock inClock Out
1Lebron06/01/22  07:0015:00
1Lebron07/01/22  07:0015:00
1Lebron08/01/22  07:0015:00
2Ari06/01/22  07:0015:00
2Ari07/01/22  07:0015:00
2Ari08/01/22  07:00

15:00

 

 

and employee table:

 

IdNameDatePayment per hour
1Lebron06/01/22  1
1Lebron07/01/22  1.25
1Lebron08/01/22  1.75
2Ari06/01/22  2
2Ari07/01/22  2.5
2Ari08/01/22

  3

 

i want to create a card on my dashboard where it shows the payment per hour of the month. so in june when i press the dat june it shows me 1 for lebron and 2 for ari. but when i press on july, i want it to change to 1.25 for lebron and 2.5 for ari.

 

im using the max of payment per hour but not working it only shows me the max . i need help please

note i have a relationship between the 2 tables. i created an index id  : 

New Id Attendance = [Id]&"_"&FORMAT([Date],"YYMM")
New Id Employee = [Id]&"_"&FORMAT([Date],"YYMM")
 
1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

It is recommended to create a calendar table first and you may need to add a filter  in your original measure like:

payment per hour(Ari) = CALCULATE(MAX(employee[Payment per hour]),FILTER(employee,employee[Name]="Ari"))
payment per hour(Lebron) = CALCULATE(MAX(employee[Payment per hour]),FILTER(employee,employee[Name]="Lebron"))

You can also try multi-row card to display you data.

veasonfmsft_0-1659082070189.png

Best Regards,
Community Support Team _ Eason

 

View solution in original post

3 REPLIES 3
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

It is recommended to create a calendar table first and you may need to add a filter  in your original measure like:

payment per hour(Ari) = CALCULATE(MAX(employee[Payment per hour]),FILTER(employee,employee[Name]="Ari"))
payment per hour(Lebron) = CALCULATE(MAX(employee[Payment per hour]),FILTER(employee,employee[Name]="Lebron"))

You can also try multi-row card to display you data.

veasonfmsft_0-1659082070189.png

Best Regards,
Community Support Team _ Eason

 

SpartaBI
Community Champion
Community Champion

@Anonymous take a look at this file and let me know if this is waht you meant:
Create Card of newest value per date selected 2022-07-25.pbix


2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Showcase Report – Contoso By SpartaBI

amitchandak
Super User
Super User

@Anonymous , Refer if this can help

https://amitchandak.medium.com/power-bi-get-the-sum-of-the-last-latest-value-of-a-category-f1c839ee884e

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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