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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Rsanjuan
Advocate III
Advocate III

Calculating for Quarter

Let's say I have the following:

 

2016 Bids = CALCULATE(
DistinctCount(Opportunity[Bid_Number__c]),YEAR(Opportunity[CreatedDate])=YEAR(TODAY())-1)

 

It's calculating the # of bids for entire year of 2016.  What would be the calculation formula for calculating only for Q2?  I know I can do it through creating a filter, but would like a calculation.

 

Thanks in advance!

1 ACCEPTED SOLUTION

2016 Bids = CALCULATE(
DistinctCount(Opportunity[Bid_Number__c]),filter(opportunity,

                                                                               YEAR(Opportunity[CreatedDate])=YEAR(TODAY())-1

                                                                               && Quarter = "Q2"))

 

 

i think!

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
vanessafvg
Super User
Super User

do you have a date table?  if you had a date table and had already derived your quarters that is one way to do it.





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@vanessafvg

 

I have this date table as:

 

Date = ADDCOLUMNS(CALENDAR(DATE(2000,1,1),DATE(2025,12,31)),
"DateAsInteger", FORMAT ( [Date], "YYYYMMDD" ),
"Year", YEAR ( [Date] ),
"Monthnumber", FORMAT ( [Date], "MM" ),
"YearMonthnumber", FORMAT ( [Date], "MM YYYY" ),
"YearMonthShort", FORMAT ( [Date], "mmm YYYY" ),
"MonthNameShort", FORMAT ( [Date], "mmm" ),
"MonthNameLong", FORMAT ( [Date], "mmmm" ),
"DayOfWeekNumber", WEEKDAY ( [Date] ),
"DayOfWeek", FORMAT ( [Date], "dddd" ),
"DayOfWeekShort", FORMAT ( [Date], "dddd" ),
"Quarter", "Q" & FORMAT ( [Date], "Q" ),
"YearQuarter", FORMAT ( [Date], "YYYY" ) & "/Q" & FORMAT ( [Date], "Q" )
)

 

What would be the correct syntax to create the calculation based on that?  Thanks!

 

 

2016 Bids = CALCULATE(
DistinctCount(Opportunity[Bid_Number__c]),filter(opportunity,

                                                                               YEAR(Opportunity[CreatedDate])=YEAR(TODAY())-1

                                                                               && Quarter = "Q2"))

 

 

i think!

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.