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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
kousar99
Helper I
Helper I

How to write dax to get only 3rd Quarter from data of 2020 and keeping condition that <'2019-07'

Hi Experts,

 

As I am facing issue writing a DAX for getting only 3rd quarter from 2020 data and it has 5 years (2015 to 2020) data  where i have to filter < 2019-07 and the output should be like this

YEAR_MONTH
2020-07
2020-09
2020-08

  I am looking for your kind response.

 

Thanks in advance.

Mdkousar

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi, @kousar99 ;

Could you please consdier sharing more details about it and posting expected result so it is clear on what needs to be implemented? And It would be great if there is a sample file without any sesentive information here.
It makes it easier to give you a solution.


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-yalanwu-msft
Community Support
Community Support

Hi, @kousar99 ;

You could create a flag measure.then apply it into visual.

flag = IF(YEAR( MAX([Date]) )=2020&&QUARTER(MAX([Date]))=3,1,0)

vyalanwumsft_0-1650351646603.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Wu,

 I didn't get what exactly you're trying to convey here,Could you please let me know exactly what it is

Whitewater100
Solution Sage
Solution Sage

Hi:

This is hard to answer without seeing example data. If you have a data model set up with a Date Table (I will refer to it as DimDate and are trying to figure out a measure like [Total Sales] for this specific period you can use another measure. Let's say Total Sales = SUM(FactTable[Sales amt])

Specific 2020 Quarter = CALCULATE([Total Sales], DATESBETWEEN( DimDates[Date], 

                              DATE(2020, 7 ,1), DATE(2020, 9,30)))

You can aslo FILTER using tables as well. 

                      

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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