cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

DAX measure SWITCH TRUE()

Hi everybody, i need your help with a DAX Measure. I have created this measure and it is working. (i have first created a count measure, and then my goal is to find on how many rows the count is more than 2)

Measure =
VAR
 sumCount =SUMX('Fact_Sheet_TAS Time Accounting'.[Count of TS_Status running total in Time_Week])
RETURN
SWITCH(TRUE().sumCount>2.VALUE(1).BLANK())

Table.PNG

The fact is that on the Total columns i don't have the actual total but i have alway number 1 ? Do you know the Reason for this ?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Resolver I
Resolver I

Re: DAX measure SWITCH TRUE()

Since you have used Value(1) in switch it will give as 1 if true....

 

You can use COUTNROWS (FILTER( Table, [Count] > 2)).. Hope I am understanding ur requirement correctly

View solution in original post

Highlighted
Community Support
Community Support

Re: DAX measure SWITCH TRUE()

Hi Giavo,

 

As @afzalphatan has mentioned, you use DAX formula below:

Measure = COUNTROWS(FILTER('Fact_Sheet_TAS Time Accounting', [Count of TS_Status running total in Time_Week] > 2))

 

The result is like this:

 1111.png

Please refer to PBIX file: https://www.dropbox.com/s/522wvs6p2522a78/For%20Giavo.pbix?dl=0

 

Best Regards,

Jimmy Tao

View solution in original post

2 REPLIES 2
Highlighted
Resolver I
Resolver I

Re: DAX measure SWITCH TRUE()

Since you have used Value(1) in switch it will give as 1 if true....

 

You can use COUTNROWS (FILTER( Table, [Count] > 2)).. Hope I am understanding ur requirement correctly

View solution in original post

Highlighted
Community Support
Community Support

Re: DAX measure SWITCH TRUE()

Hi Giavo,

 

As @afzalphatan has mentioned, you use DAX formula below:

Measure = COUNTROWS(FILTER('Fact_Sheet_TAS Time Accounting', [Count of TS_Status running total in Time_Week] > 2))

 

The result is like this:

 1111.png

Please refer to PBIX file: https://www.dropbox.com/s/522wvs6p2522a78/For%20Giavo.pbix?dl=0

 

Best Regards,

Jimmy Tao

View solution in original post

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors