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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Kim_Sky
Helper II
Helper II

shown true or false by date filter

Hi, 

I have the table name total value

TimestampValueCategory
5/6/225A
5/6/228A
5/6/229B
7/6/221C
7/6/2214A

 

I using this dax for summaries table,

 

total value table =sum(total value[value])

Daily = SUMMARIZE(total value,total value[Timestamp],total value[Category],"Value",[Total value table])

yesorno = SWITCH(TRUE(),'Daily'[Category]="A"&&'Daily'[Value]>13,TRUE,'Daily'[Category]="A"&&'Daily'[Value]<=13,FALSE,BLANK())

 

 

In the result should 

TimestampCategoryyesorno
5/6/22AFalse
5/6/22BBlank 
7/6/22CBlank 
7/6/22ATrue

 

How should I create the card if I have a date filter, I want to shown False for the day I selected (5/6/22)  and True for the day (7/6/22). 

 

I tried to input the yesorno into card but it shown the count of yesorno. 

 

Thanks for your help. 

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

Hi @Kim_Sky 

 

Please try following DAX:

 

yesorno = SWITCH(
    TRUE(),
    'Daily'[Category] = "A" && 'Daily'[Value] > 13, "TRUE",
    'Daily'[Category]="A" && 'Daily'[Value] <=13, "FALSE")

 

Then you can get result you want.

vyadongfmsft_0-1661161548797.png

 

Best regards,

Yadong Fang

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

2 REPLIES 2
v-yadongf-msft
Community Support
Community Support

Hi @Kim_Sky 

 

Please try following DAX:

 

yesorno = SWITCH(
    TRUE(),
    'Daily'[Category] = "A" && 'Daily'[Value] > 13, "TRUE",
    'Daily'[Category]="A" && 'Daily'[Value] <=13, "FALSE")

 

Then you can get result you want.

vyadongfmsft_0-1661161548797.png

 

Best regards,

Yadong Fang

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

Kim_Sky
Helper II
Helper II

Kim_Sky_0-1660747565185.png

Kim_Sky_1-1660747577052.png

I would like to show the result of A only, and if A is true and false then always true. 

 

Thanks for your help. 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.