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
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
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.

Top Solution Authors