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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
Sam-L
Frequent Visitor

Create a slicer based on multiple fields of data

Hello,

 

I'm currently working with some medical intervention data and I'm looking to create a new slicer filter which allows the selection of a medical intervention.

 

Currently, my data has a different field for different interventions which contain either a blank (intervention not carried out) or a date/time (intervention took place at that moment). Ideally, I'd like to create one new column that would pull in this information i.e. Field Name: Intervention_Type with values separated by ( | ) i.e. Intervention1|Intervention2|Intervention3 - based on if a time is valid in those fields.

Failing the above, a new column for each intervention with a replacement of blank values which shows 'No' instead and where there is a time showing 'Yes', would suffice. Is this possible to do?

 

Thanks in advance!

1 ACCEPTED SOLUTION
Sam-L
Frequent Visitor

Thanks for your help @v-jingzhang @amitchandak. I have found a different way around this by creating a conditional column based on if a time exists or not. If a time exists, it stores 'yes', if it's null, it stores 'no'. I've done this for each of my interventions and created a card for each intervention.

Sam-L_0-1619797990410.png

 

View solution in original post

4 REPLIES 4
Sam-L
Frequent Visitor

Thanks for your help @v-jingzhang @amitchandak. I have found a different way around this by creating a conditional column based on if a time exists or not. If a time exists, it stores 'yes', if it's null, it stores 'no'. I've done this for each of my interventions and created a card for each intervention.

Sam-L_0-1619797990410.png

 

v-jingzhang
Community Support
Community Support

Hi @Sam-L 

 

You could use below codes to create calculated columns. Is this what you want to get?

Column = [A_Time]&"|"&[B_Time]&"|"&[C_Time]
Column 2 = IF(ISBLANK([A_Time]),"No","Yes")&"|"&IF(ISBLANK([B_Time]),"No","Yes")&"|"&IF(ISBLANK([C_Time]),"No","Yes")
Column 3 = IF(ISBLANK([A_Time]),"No",[A_Time])&"|"&IF(ISBLANK([B_Time]),"No",[B_Time])&"|"&IF(ISBLANK([C_Time]),"No",[C_Time])

042902.jpg

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

amitchandak
Super User
Super User

@Sam-L ,Can you share sample data and sample output in table format?

 

As of now it seems like a new column

=[Intervention1] & "|" & [Intervention2] & "|" & [Intervention3]

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Hello, thanks for your response. Is this screenshot okay? 

Sam-L_0-1619528197157.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

October NL Carousel

Fabric Community Update - October 2024

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