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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
JamesBurke
Helper III
Helper III

Placeholder error

Hi All , 

 

I'm looking for a measure to count the amount of buildings that exceed a threshold of one so i can count how mnay meters were active yesterday. 

 

Online Buildings = CALCULATE(DISTINCTCOUNT(FactUWP[Grouped]),if([Total Consumption Todays Usages] > 1 ,1,0))

 

I'm using below but getting the error a function placeholder has been used in a True/False Expression ?

 

Any help would be Appericated 🙂

1 ACCEPTED SOLUTION
SamWiseOwl
Super User
Super User

Hi @JamesBurke 

 

Two methods you coud try, one filtering the data and the other using an iterator function.

 

Online Buildings Filter=
Calculate(

DISTINCTCOUNT(FactUWP[Grouped])

Filter(FactUWP, [Total Consumption Todays Usages] > 1)
)

 

Countx values =
SUMX(
Values( FactUWP[Grouped] )

, if([Total Consumption Todays Usages] > 1 ,1,0)

)

 

The error is because you aren't saying what you want to do with the IF statement.


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

View solution in original post

4 REPLIES 4
SamWiseOwl
Super User
Super User

Hi @JamesBurke 

 

Two methods you coud try, one filtering the data and the other using an iterator function.

 

Online Buildings Filter=
Calculate(

DISTINCTCOUNT(FactUWP[Grouped])

Filter(FactUWP, [Total Consumption Todays Usages] > 1)
)

 

Countx values =
SUMX(
Values( FactUWP[Grouped] )

, if([Total Consumption Todays Usages] > 1 ,1,0)

)

 

The error is because you aren't saying what you want to do with the IF statement.


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Hi @JamesBurke ,

We haven’t heard back from you regarding our previous response and wanted to check if your issue has been resolved.

If it has, please consider clicking “Accept Answer” and “Yes” if you found the response helpful.
If you still have any questions or need further assistance, feel free to let us know — we're happy to help!

Thank you!

Hi @JamesBurke 

If a community member's response addressed your query, please consider marking it as Accepted Answer and click Yes if you found it helpful.

If you have any further questions, feel free to reach out.
Thank you for being a valued member of the Microsoft Fabric Community Forum!

 

Hi @JamesBurke ,

We haven’t heard back from you regarding our previous response and wanted to check if your issue has been resolved.

If it has, please consider clicking “Accept Answer” and “Yes” if you found the response helpful.
If you still have any questions or need further assistance, feel free to let us know — we're happy to help!

Thank you!

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors