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
ImageZ
Frequent Visitor

Counting Values from another column

Hey (first post here so I'll try to be thorough) - an example of my table below.

 

ID      TITLE        CLI           Campaign     Call Reason

1        111          <null>     New sale      <null>

2        <null>     111          <null>          Sales Query

3        333          <null>      Cancel         <null>

4        <null>     333          New Sale      Sale sold

5        333         <null>      New Sale      Sale not sold

6        333         <null>      Cancel          Sale sold

 

Background - we send some SMS's to customers and im trying to determine how many of them callback on the back of an SMS and then do some matching on the Campaign/Reason (which isnt an exact match - annoying but not major).

 

However I'm having real trouble using the measures/adding column/writing DAX transformations to effectively have an additional column created based on whetther the CLI and the TITLE match....

 

Any ideas?

1 ACCEPTED SOLUTION

hey,

 

think ive managed to fix it from using a very old thread using the below - seems to do the trick

 

Callback on SMS =
VAR _B =
FIRSTNONBLANK ( Call_List[TITLE], "" )
VAR _C =
CALCULATE (
COUNTROWS ( 'Call_List' ),
FILTER ( ALL ( 'Call_List' ), 'Call_List'[CLI] = _B )
)
RETURN
IF ( ISBLANK ( _C ), 0, _C )

View solution in original post

7 REPLIES 7
Vijay_A_Verma
Super User
Super User

Then use this

=if('Table1'[TITLE]=0,"Yes","No")

Again, unfortunately not.

 

May be worth adding that not every customer that rang in (had a CLI) would have an SMS sent to them, likewise not every customer who had an SMS sent to them would have called in (CLI)

Can you document your criteria for Yes or No? Above formula will give result as per data set and result posted by you. 

If you can post data where the formula is not giving the result and the reason for that, then right formula can be made.

hey,

 

think ive managed to fix it from using a very old thread using the below - seems to do the trick

 

Callback on SMS =
VAR _B =
FIRSTNONBLANK ( Call_List[TITLE], "" )
VAR _C =
CALCULATE (
COUNTROWS ( 'Call_List' ),
FILTER ( ALL ( 'Call_List' ), 'Call_List'[CLI] = _B )
)
RETURN
IF ( ISBLANK ( _C ), 0, _C )
Vijay_A_Verma
Super User
Super User

Use below formula in a Calculated column

=if('Table'[TITLE]='Table'[CLI],"Yes","No")
Replace Table with your table name.

Hey,

 

Unfortunately this wouldnt work as each row is individual, if it has a number in the TITLE it has a null CLI and vice versa

ImageZ
Frequent Visitor

To add to the above (cant edit)

The resulting table would be something like 

 

ID      TITLE        CLI           Campaign     Call Reason         CallbackonSMS

1        111          <null>     New sale      <null>                  0 or no

2        <null>     111          <null>          Sales Query         1 or yes

3        333          <null>      Cancel         <null>                 0 or no

4        <null>     333          New Sale      Sale sold             1 or yes

5        333         <null>      New Sale      Sale not sold       0 or no

6        333         <null>      Cancel          Sale sold             0 or no

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.

Top Solution Authors
Top Kudoed Authors