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
jussiwaisto
Helper I
Helper I

Basic filtering by using DAX

Hi, 

 

i'm trying to make very simple filtering by using DAX. The situation is this:

1. I have a table 'ekoseer Sopimus'

2. I have a measure, which counts how many Id's I have in table

 

Then I would like to count Id's which "'SopimuksenTila" is value "2". The result should be three.


Screen Shot 2019-07-08 at 9.59.57.png

I'm trying to make a new measure which uses measure Id_sopimus_kpl and filters it, but I can't make working syntax:

 

Screen Shot 2019-07-08 at 10.11.41.png

 

What is the right syntax?

 

I know this should be very simple, but for some reason my PowerBi changes commas to semicolons and syntax won't work. 

 

Thanks for helping!

4 ACCEPTED SOLUTIONS
Stachu
Community Champion
Community Champion

if your system uses semicolons as list separator then you should use it in the measures too

 

you can validate you syntax here:
https://www.daxformatter.com/

 

right now I'd suggest:
1) replacing commas with semicolons

2) the column name should be 

'ekoseer Sopimus'[SopimuksenTila]

I think there is an apostrophe missing before '[' 

 

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

v-lili6-msft
Community Support
Community Support

hi, @jussiwaisto 

You should use this simple formula as below:

Measure = 
CALCULATE([Id_sopimus_kpI], 'ekoseer Sopimus'[Id]="1")

1.JPG

and the column name should be 

'ekoseer Sopimus'[SopimuksenTila]  

and if you are using the wrong delimiter, replace the "," with a ";" and see if it works.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable


@jussiwaisto wrote:

Hi, 

 

i'm trying to make very simple filtering by using DAX. The situation is this:

1. I have a table 'ekoseer Sopimus'

2. I have a measure, which counts how many Id's I have in table

 

Then I would like to count Id's which "'SopimuksenTila" is value "2". The result should be three.


Screen Shot 2019-07-08 at 9.59.57.png

I'm trying to make a new measure which uses measure Id_sopimus_kpl and filters it, but I can't make working syntax:

 

Screen Shot 2019-07-08 at 10.11.41.png

 

What is the right syntax?

 

I know this should be very simple, but for some reason my PowerBi changes commas to semicolons and syntax won't work. 

 

Thanks for helping!


@jussiwaisto  

1. First you need to count the ID table

2. then, Calculate( <your measure> ,  your filter = "2" ) 

What i have seen is too many open ")" in your syntax.  

View solution in original post

Thank you very much! It works now!

View solution in original post

4 REPLIES 4
Anonymous
Not applicable


@jussiwaisto wrote:

Hi, 

 

i'm trying to make very simple filtering by using DAX. The situation is this:

1. I have a table 'ekoseer Sopimus'

2. I have a measure, which counts how many Id's I have in table

 

Then I would like to count Id's which "'SopimuksenTila" is value "2". The result should be three.


Screen Shot 2019-07-08 at 9.59.57.png

I'm trying to make a new measure which uses measure Id_sopimus_kpl and filters it, but I can't make working syntax:

 

Screen Shot 2019-07-08 at 10.11.41.png

 

What is the right syntax?

 

I know this should be very simple, but for some reason my PowerBi changes commas to semicolons and syntax won't work. 

 

Thanks for helping!


@jussiwaisto  

1. First you need to count the ID table

2. then, Calculate( <your measure> ,  your filter = "2" ) 

What i have seen is too many open ")" in your syntax.  

Thank you very much! It works now!

v-lili6-msft
Community Support
Community Support

hi, @jussiwaisto 

You should use this simple formula as below:

Measure = 
CALCULATE([Id_sopimus_kpI], 'ekoseer Sopimus'[Id]="1")

1.JPG

and the column name should be 

'ekoseer Sopimus'[SopimuksenTila]  

and if you are using the wrong delimiter, replace the "," with a ";" and see if it works.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Stachu
Community Champion
Community Champion

if your system uses semicolons as list separator then you should use it in the measures too

 

you can validate you syntax here:
https://www.daxformatter.com/

 

right now I'd suggest:
1) replacing commas with semicolons

2) the column name should be 

'ekoseer Sopimus'[SopimuksenTila]

I think there is an apostrophe missing before '[' 

 

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

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 Fabric 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.