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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
GunnerJ
Post Patron
Post Patron

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

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.

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
Community Support
Community Support

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.

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.

@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!

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.

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.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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