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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

DAX showing error!

Hello,

 

I am trying to write the dax as below:

 

DIVIDE(CALCULATE(SUM(DE_C[TOTAL]),DE_C[RESPONSE] = "A"),CALCULATE(SUM(DE_C[TOTAL]),DE_C[RESPONSE] IN{"A","D","U"},0))
 
but pbi is showing me the below error:
shobhitkaplay_0-1656001343778.png

Can somebody please help me. 

3 REPLIES 3
Smalfly
Responsive Resident
Responsive Resident

Hi @Anonymous ,

 

please try this:

 

DIVIDE(CALCULATE(SUM(DE_C[TOTAL]),DE_C[RESPONSE] = "A"),CALCULATE(SUM(DE_C[TOTAL]),DE_C[RESPONSE] IN{"A","D","U"}),0)
 
It is most likely due to a misplaced closing bracket for the calculate function in the denominator.
Anonymous
Not applicable

please give a sample data example in an excel sheet and also say what do you expect as an output so that i can help you

otravers
Community Champion
Community Champion

There's another forum for DAX questions, this one is about the Power BI service.

https://community.powerbi.com/t5/DAX-Commands-and-Tips/bd-p/DAXCommands

------------------------------------------------
1. How to get your question answered quickly - good questions get good answers!
2. Learning how to fish > being spoon-fed without active thinking.
3. Please accept as a solution posts that resolve your questions.
------------------------------------------------
BI Blog: Datamarts | RLS/OLS | Dev Tools | Languages | Aggregations | XMLA/APIs | Field Parameters | Custom Visuals

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.