cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
GunnerJ Member
Member

Likely simple but why can't I add in the calculation?

The calculation below works as expected except it refuses to add the 9106 at the end. Why is this and how can I resolve it? 
 
Cust # + demand adjust = CALCULATE(COUNT('Customers'[BI_ACCT]), or('Customers'[BI_TYPE_SRV_GRP] = "ELEC", 'Customers'[BI_TYPE_SRV_GRP] ="ELECO")) + 9106
1 ACCEPTED SOLUTION

Accepted Solutions
v-lid-msft Super Contributor
Super Contributor

Re: Likely simple but why can't I add in the calculation?

Hi @GunnerJ ,

 

If you used this formula as a calculated column, it will evaluate in current row, and return 9107 or 9106 depends on the BI_TYPE_SRV_GRP Column

 

11.PNG

 

If you want to archive this goal, we can use this formula.

 

Cust # + demand adjust Column 2 = 
IF (
    OR (
        'Customers'[BI_TYPE_SRV_GRP] = "ELEC",
        'Customers'[BI_TYPE_SRV_GRP] = "ELECO"
    ),
    9107,
    9106
)

12.PNG

 

If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

BTW, pbix as attached.

 

Best regards,

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

View solution in original post

3 REPLIES 3
v-lid-msft Super Contributor
Super Contributor

Re: Likely simple but why can't I add in the calculation?

Hi @GunnerJ ,

 

Based on my test, this measure works on my side, if you means the result of 39106, you should use & 9106.

 

10.PNG

 


If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

BTW, pbix as attached.

 

Best regards,

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

GunnerJ Member
Member

Re: Likely simple but why can't I add in the calculation?

@v-lid-msft 

Thank you for the reply. I was using a column instead of measure and after the switch my issue seems to be resolved. I knew it had to be something simple!

v-lid-msft Super Contributor
Super Contributor

Re: Likely simple but why can't I add in the calculation?

Hi @GunnerJ ,

 

If you used this formula as a calculated column, it will evaluate in current row, and return 9107 or 9106 depends on the BI_TYPE_SRV_GRP Column

 

11.PNG

 

If you want to archive this goal, we can use this formula.

 

Cust # + demand adjust Column 2 = 
IF (
    OR (
        'Customers'[BI_TYPE_SRV_GRP] = "ELEC",
        'Customers'[BI_TYPE_SRV_GRP] = "ELECO"
    ),
    9107,
    9106
)

12.PNG

 

If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

BTW, pbix as attached.

 

Best regards,

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

View solution in original post

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 140 members 1,582 guests
Please welcome our newest community members: