Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I am new to Power Bi and DAX and hoping someone can help with the following please.
I am trying to create a DAX to calculate the sum of stock that has been allocated for sale. In our data set we have columns with "Cost price" and "allocated to" the "allocated to" column contains the customer account numbers so they are all different . I am trying to calculate the sum of the "cost value" if there is data in the "allocated to" column. Is this possible?
Any advice would be appreciated!
Regards,
Solved! Go to Solution.
Hi @JamesGordon
Total allocated cost=Calculate(Sum(table[Cost]),filter(table,table[Allocated to] <> blank()))
Total UNallocated cost=Calculate(Sum(table[Cost]),filter(table,table[Allocated to] = blank()))
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.
please share some sample data and expected output.
Thanks,
Pravin
Hi,
I have attached an illustration that will hopefully make it clearer - let me know if more detail is required.
Hi @JamesGordon
Total allocated cost=Calculate(Sum(table[Cost]),filter(table,table[Allocated to] <> blank()))
Total UNallocated cost=Calculate(Sum(table[Cost]),filter(table,table[Allocated to] = blank()))
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |