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
Lsh0576
Frequent Visitor

Help with a DAX Query: MIN Date as x-axis to my chart

Hello there! I was wondering if someone can help me this chart I am trying to develop. The bar chart I am trying to create has the following:

 

x-axis = Min date of appraisal submission date

y-axis = count of appraisals

 

My table has rows for each submission date so I would only want to grab the earliest submitted date and count the # of appraisals submitted on that date. 

 

Thank you in advance for your assistance.

 

Lovella

 

 

3 REPLIES 3
Mrxiang
Helper II
Helper II

Sure, I can help you with that. You can use the DAX function MIN to get the earliest submission date and then use the COUNTROWS function to count the number of appraisals submitted on that date. Here's an example DAX formula: Appraisals Count = COUNTROWS(FILTER('Table', 'Table'[Submission Date] = MIN('Table'[Submission Date]))) Replace 'Table' with the name of your table and 'Submission Date' with the name of your submission date column. This formula will give you the count of appraisals submitted on the earliest submission date. You can use this formula in your bar chart's y-axis.

v-eqin-msft
Community Support
Community Support

Hi  @Lsh0576 , 
 

I created some data: 

veqinmsft_0-1684915881474.png

 

Here are the steps you can follow: 

1. Create measure. 

Flag = 
IF( 
    MAX('Table'[appraisal submission date])= MINX(ALL('Table'),[appraisal submission date]),1,0) 

 2. Place [Flag]in Filters, set is=1, apply filter. 

veqinmsft_1-1684915881475.png

3. Result: 

veqinmsft_2-1684915945985.png

 

Best Regards, 

Liu Yang 

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

 

Thank you for this. I realized that all of my formulas were solved via switching to import mode (from Direct Query..too much limitations). But I appreciate the assistance! Have a great day!

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.