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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

How to count 2 condition?

Now I count status Date = 2021 04 01

but I want to count status Date = 2021 04 01  and status = Complete

I have DAX as below.

Count of Implement Status Date = VAR __CurrentMeasure =
CALCULATE(
COUNTA('Update'[Status Date]),
EOMONTH('Update'[Status Date],-1)+1 = DATE(2021, 4, 1)
)
RETURN
IF ( ISBLANK ( __CurrentMeasure ), 0, __CurrentMeasure )
Please guide me  about it.
1 ACCEPTED SOLUTION

Hi, @Anonymous 

I am not sure how your data type in your pbix file looks like, but I think you need to have a date-type column in the table.

Please check the below pbix file's link.

 

Picture1.png

 

https://www.dropbox.com/s/xbgle5ipajq5i83/adamasmay.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

9 REPLIES 9
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

DAX not support compare date and text. Please try function Value or format for convert.

 Data Type changes to "Text": Data:Column =FORMAT('Calendar'[Date],"yyyymmyy") 

"Text"  Type changes to Data:Column = VALUE(FORMAT(TODAY(), "YYYYMMDD"))

If question still unsolved ,could you pls share your pbix file? Remember to remove confident data.

 

Wish it is helpful for you!

 

Best Regards

Lucien

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please try the below.

 

Count of Implement Status Date =
VAR __CurrentMeasure =
CALCULATE (
COUNTA ( 'Update'[Status Date] ),
EOMONTH ( 'Update'[Status Date], -1 ) + 1
= DATE ( 2021, 4, 1 ),
'Update'[Status] = "Complete"
)
RETURN
IF ( ISBLANK ( __CurrentMeasure ), 0, __CurrentMeasure )

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

@Jihwan_Kim It show error can't load data from image.

It errorshow DAX not support compare date and text. Please try function Value or format for convert.

Please guide me.

 

adamasmay_1-1620197376813.png

 

Anonymous
Not applicable

@Jihwan_KimIt show error can't load data from image.

It errorshow DAX not support compare date and text. Please try function Value or format for convert.

 

Please guide me.

 

adamasmay_0-1620196178590.jpeg

 

Hi, @Anonymous 

Thank you for your feedback.

Please share your sample pbix file's link here, then I can try to look into it to come up with a more accurate measure.

Thanks.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

@Jihwan_KimI can't send .pbix file to you.

If I share file excel that I use read in power bi.

Are you okay?

Hi, @Anonymous 

Yes, please share your excel file with mentioning how you want to show in visual, for instance, table visual or bar chart, or any others.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

@Jihwan_Kim @v-luwang-msft  file excel example : file excel input 

I want to count status (2021) = Complete and status date = april 2021

 

I want to show amount count in card visual.

Please guide me about it.

Hi, @Anonymous 

I am not sure how your data type in your pbix file looks like, but I think you need to have a date-type column in the table.

Please check the below pbix file's link.

 

Picture1.png

 

https://www.dropbox.com/s/xbgle5ipajq5i83/adamasmay.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.