0

I have a table visualization in power bi created and I would want to show data in a column based on condition from another column. I have a country, users, and a bill in the dataset that is loaded. On the table visualization I want to only show the count of users having bill \>1.

What I have in the dataset:

country users bill
America user1 1
America user1 1
America user1 1
America user2 1
America user2 1
UK user4 1
UK user4 1
UK user5 1
UK user6 1

What I want to look in the table visualization:

country count of users who have greater than 1 bill
America 2
UK 1

I created below filter but it is not showing right numbers:

_filter = if(SUM('Table'\[Bill\])\>1, 1,0)
1
  • Looking for help. Can anyone please suggest. Commented Oct 7, 2024 at 4:01

1 Answer 1

0

pls try this

MEASURE =
VAR _tbl =
    SUMMARIZE ( Bill, Bill[country], Bill[users], "total", SUM ( Bill[bill] ) )
RETURN
    COUNTROWS ( FILTER ( _tbl, [total] > 1 ) )

enter image description here

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks for the reply. I tried this and created a new measure. But I'm not able to see the result. My intention is to use this result in the Table visual as a column. Can I use it that way to the already existing table visual?
what's the error message you got? I used the dataset that you provided to get the result
Hurray, It worked... able to add the measure to the visual table. There was no error as such but was not seeing the values calculated by the measure. Able to do it now. Thank you so much once again for helping. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.