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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Turka89
Helper I
Helper I

Cannot convert value of type text to true/false

Hi Community,

 

I have two tables Requisition and Application. Requisition has a division column and its values are  IT, HR, Finance. Application has column called current status of which have a values of interview and hired. 

 

What I would like to see is how many applicant on interview per Division values(IT,HR,Finance) and represented by numbers if its true and 0 if its false. 

 

Here is  a look of the tables:

 

division.pngstatus.png

 

I've tried this DAX if it makes any sense i get the aforementioned error on title 

 

Measure = CALCULATE(COUNTX(APPLICATION, APPLICATION[CurrentStatus] = "ITI - Assessment"), IF(SELECTEDVALUE(REQUISITION[Division]), APPLICATION[CurrentStatus])) + 0

 

Result in error

 

error.pngerror1.png

 

What I would like to see

 

see.png

Thank you so mucn in advance.

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Turka89 

I'm not clear what's your rule to get the final result.

Please check my test below and tell me what's the difference between yours and mine.

Capture12.JPG

Measure = CALCULATE(COUNTROWS(FILTER(Table2,Table2[CurrentStatus]="IT-Assessment")),ALLEXCEPT(Table1,Table1[Division]))

 

Best Regards
Maggie
Community Support Team _ Maggie Li
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

6 REPLIES 6
v-juanli-msft
Community Support
Community Support

Hi @Turka89 

I'm not clear what's your rule to get the final result.

Please check my test below and tell me what's the difference between yours and mine.

Capture12.JPG

Measure = CALCULATE(COUNTROWS(FILTER(Table2,Table2[CurrentStatus]="IT-Assessment")),ALLEXCEPT(Table1,Table1[Division]))

 

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

v-juanli-msft
Community Support
Community Support

Hi @Turka89 

Is the [VacancyID] in Requisition table unique?

 

Best Regards

Maggie

Hi @v-juanli-msft

 

In Requisition Table, I cant really find any duplicate entrines under VacancyID Column but only for those VacancyID under CurrentStatus column "ITI 1st Interview, ITI - 2nd Interview, ITI - Assessment, ITI - Final Assessment". Otherwise There is duplicate entries in VacancyID column in Requisition Table

 

REQ1.png

The Above picture VacnacyID values which have current status of  one of the following values

1. ITI 1st Interview

2. ITI - 2nd Interview

3. ITI - Assessment

4. ITI - Final Assessment

 

Regardless, I have used the same column "CurrentStatus" with other Values such as 

 

1. Hired

2. On-Boarding

 

Which returns correct results to a specific divisions.

 

What I cannot understand why it does not wants to wrok with any of the "Interview" CurrentStatus Column 

 

Thank you in advance

 

az38
Community Champion
Community Champion

@Turka89 

you can use SELECTEDVALUE() inside FILTER() in measures statements

I m not sure I understand your logic but it could look like

Measure = 
CALCULATE(COUNTROWS(APPLICATION), ALLEXCEPT(APPLICATION, APPLICATION[Division]),  APPLICATION[CurrentStatus] = "ITI - Assessment")

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Hi @az38 ,

 

I have used your DAX with a bit of modification

 

Measure =
CALCULATE(COUNTROWS(APPLICATION), ALLEXCEPT(REQUISITION, REQUISITION[Division]),  APPLICATION[CurrentStatus] = "ITI - Assessment")

 

and it returns the total number of applicant on interview on all divisions and to all divisons. See picuture blow

 

asd.png

 

Thank you 

az38
Community Champion
Community Champion

@Turka89 

so, how is your Division field connected with CurrentStatus? Is it in one table? If no, create a relationships between table


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.