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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
0wlish
Frequent Visitor

Calculate x+1 if x

I'm fairly new to DAX so apologies if this is a stupid question. I have spent what feels like ages searching though!

 

I have a table with multiple variables (work types) and I need to increase the count of one variable by the total number of another variable.

 

So for every 1 HIHSYS, I need to increase the total for HIHGAS (and the overall total) by 1. Hope that makes sense. I don't want to group it as I don't want to group other variables.

 

Is there a way of doing this using DAX? I've tried CALCULATE but as they're both in the same column it doesn't like it.

 

I've recreated the table below with dummy data.

 

Workstream1/4/221/5/221/6/221/7/221/8/22
HIHSYS

4

23182
HIGAS3163912
HIGASSYS     
HIHABC238849
HIHBCD621437
HIHCDE20354
TOTAL3849292934
2 REPLIES 2
Anonymous
Not applicable

Hi @0wlish ,

 

Does your table look like as above? According to your logic, I think HIGAS in same 2022/04/01 should return 4+1 =5.

Please show me more details about your data model and show me a screenshot with the result you want. This will make it easier for me to find the solution.

 

Best Regards,
Rico Zhou

 

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

No so the totals in the table are aggregates of individual orders of that work type (total = count('table'[order_no]).  I need to create a new worktype variable that is HIHGAS+HISYS, distinct from HIHGAS

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.