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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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