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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors