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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Khalid1988
New Member

Seeking Advice on Bracket Usage in Semantic Model

Hi everyone,

I'm working on a new Semantic Model, and I wanted to share something I'm encountering. The names of the measures and columns in the model are formatted like this: `Production [Kwh]`, with spaces and square brackets.

Whenever I try to use these measures or columns in scripts, I often have to add more brackets than expected. For example:

```DAX


Branch1Prod = CALCULATE(
Production [Kwh],
Branch[branch [no]]] = "Branch1"
))
```

The engine forces me to add the extra red bracket, and then the measure doesn't work properly.

Could this issue be related to the use of brackets in the names of columns and measures, or might it be something else?

Thanks!

 

1 ACCEPTED SOLUTION
uzuntasgokberk
Super User
Super User

Hello @Khalid1988,

 

In the DAX syntax, you have to use ]] in order to reference a single ] in a measure name.

 

    CALCULATE(
        SUM(Efficient[Consumption [kWh/t Product]]]),
        FILTER(Efficient,
            Efficient[Consumption [kWh/t Product]]] > 50
            )
          )

 

İf your measure doesn't work properly that you mean the output of measure values are wrong. Probobly you need to check validation values or whether you wrote metric correctly or not

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |

 



View solution in original post

2 REPLIES 2
Krina234pestro
New Member

Hello,

You are sharing some advice on DAX syntax, specifically about referencing a single ] in a measure name. Here’s a cleaner version of your DAX code snippet: CALCULATE(
SUM(Efficient[Consumption [kWh/t Product]]),
FILTER(Efficient,
Efficient[Consumption [kWh/t Product]] > 50
)
)

If the measure isn’t working correctly, it might be due to validation issues or incorrect metric maximtimeclock references. 

 

Hope that helps. 

uzuntasgokberk
Super User
Super User

Hello @Khalid1988,

 

In the DAX syntax, you have to use ]] in order to reference a single ] in a measure name.

 

    CALCULATE(
        SUM(Efficient[Consumption [kWh/t Product]]]),
        FILTER(Efficient,
            Efficient[Consumption [kWh/t Product]]] > 50
            )
          )

 

İf your measure doesn't work properly that you mean the output of measure values are wrong. Probobly you need to check validation values or whether you wrote metric correctly or not

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |

 



Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

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.