cancel
Showing results for
Search instead for
Did you mean:
Responsive Resident

## Dax formula error Var return If distinctcount

Hi,

I need help with the following DAX Fórmula. It gives an error but not sure where is it:

Forecast Cost =
var Plan = [Forecast Plan Cost]
var Q1 = [Forecast Q1 Cost]
var Q2 = [Forecast Q2 Cost]
var Q3 = [Forecast Q3 Cost]
var Q4 = [Forecast Q4 Cost]
return

IF(DISTINCTCOUNT('Forecast Base'[Base Forecast]) = 1, SWITCH('Forecast Base'[Base Forecast Selected],Plan,Q1,Q2,Q3,Q4),"Select One Forecast for comparisson")

1 ACCEPTED SOLUTION
Community Support

hi, @cristianml

what is [Forecast Plan Cost]/ [Forecast Q1 Cost]/  [Forecast Q2 Cost]/ [Forecast Q3 Cost]/  [Forecast Q4 Cost]

What is your logic of this formula?

Sample data and expected output would help tremendously. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

Best Regards,
Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 REPLY 1
Community Support

hi, @cristianml

what is [Forecast Plan Cost]/ [Forecast Q1 Cost]/  [Forecast Q2 Cost]/ [Forecast Q3 Cost]/  [Forecast Q4 Cost]

What is your logic of this formula?

Sample data and expected output would help tremendously. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

Best Regards,
Lin

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

## Helpful resources

Announcements

#### Check it out!

Click here to read more about the June 2022 updates!

#### Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

#### Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

#### The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors