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
Rigolleto
Resolver I
Resolver I

How to select a day of the week and show it in a card

Hi,

I need to show in a card data related with daily sales, as the screenshot shown, notice that I have Department , day of the week and sales, do i need to do is in a slice choose for a department then behide scene get the last day of the week populated with sales, in this example sales for Tuesday , in the first example DEP1 was selected and the last day sales uploaded was Tuesday, if I pick from the slice DEPT2 then the logic shoudl check for the las day loaded, in this case Yuesday and populate the card with 80.

Thanks  in advance!!!

 

 

CARD.png

 

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

@Rigolleto ,

 

You may create a measure using DAX below:

Result = 
VAR Last_Index = CALCULATE(MAX(Table1[Index]), FILTER(Table1, Table1[Sales] <> BLANK()))
VAR Last_Day = CALCULATE(MAX(Table1[DayOfWeek]), FILTER(Table1, Table1[Index] = Last_Index))
VAR Sales = CALCULATE(MAX(Table1[Sales]), FILTER(Table1, Table1[DayOfWeek] = Last_Day))
RETURN 
CONCATENATE(Last_Day, CONCATENATE(UNICHAR(10), sales))

Capture.PNG 

 

Community Support Team _ Jimmy Tao

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

1 REPLY 1
v-yuta-msft
Community Support
Community Support

@Rigolleto ,

 

You may create a measure using DAX below:

Result = 
VAR Last_Index = CALCULATE(MAX(Table1[Index]), FILTER(Table1, Table1[Sales] <> BLANK()))
VAR Last_Day = CALCULATE(MAX(Table1[DayOfWeek]), FILTER(Table1, Table1[Index] = Last_Index))
VAR Sales = CALCULATE(MAX(Table1[Sales]), FILTER(Table1, Table1[DayOfWeek] = Last_Day))
RETURN 
CONCATENATE(Last_Day, CONCATENATE(UNICHAR(10), sales))

Capture.PNG 

 

Community Support Team _ Jimmy Tao

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

 

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.