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
Anonymous
Not applicable

DAX challenge - How to create a formula to calculate a multiple answer results survey

Hello to all DAX wizz , 

 

I have a DIM table of survey questions and answers ( containing all possible combinations of it )

and it looks like this : 

QUE_ANS_ID ( PK )

QUE_ID
QUE_TITLE
ANSWER_ID
ANSWER_VALUE
and a fact table of customers answers that built like this :

QUE_ANS_ID

CUST_ID
QUE_SYS_ID
ANSWER_ID
QUE_TITLE
ANSWER_VALUE

How can I create a filter/ measure that showes a combination of selected answers in the answer value coulmn instead of only one  ?

In other words I want to  " translate "  this SQL query to DAX :

 

select count (cust_id )
from a_fact_cust_answ
where que_id in ( 1,2)
AND answer_value in ('Male' , 'Yes')

Today , for example   ,if  I want to see all Male customers that own a car ,   I get a results of all male and ALL the customers that own a car 

 

 

I think it can be done by a complex filter but i dont realy know how to format it ( q&a in hirrachy and the count of the ID)

Any help would be much appreciated

Thanks !

 

 

0 REPLIES 0

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