Forum Discussion
Pinky0404
8 years agoHelper III
DAX Fun
Hi, I have a requirement to create a trend(in %) for the repeat offenders who clicked in campaigns. Eg: A, B, C are three campaigns and are three different tables.There is a column called "Cl...
- 8 years ago
Pinky0404 wrote:
Hi,
Here is the sample data set .
You need to union those 3 tables
Surveys = UNION(Survey1,Survey2,Survey3)
Then create measures as
perc A & B & C = VAR summizedTbl = SUMMARIZE ( FILTER ( Surveys, Surveys[Primary Clicked] = TRUE ), Surveys[Email address], "CNT", DISTINCTCOUNT ( Surveys[Survey Title] ) ) RETURN DIVIDE ( COUNTROWS ( FILTER ( summizedTbl, [CNT] = 3 ) ), DISTINCTCOUNT ( Surveys[Email address] ) ) perc A & B = VAR summizedTbl = SUMMARIZE ( FILTER ( Surveys, Surveys[Primary Clicked] = TRUE &&(Surveys[Survey Title]="Survey upgrade"||Surveys[Survey Title]="Survey Apple") ), Surveys[Email address], "CNT", DISTINCTCOUNT ( Surveys[Survey Title] ) ) RETURN DIVIDE ( COUNTROWS ( FILTER ( summizedTbl, [CNT] = 2 ) ), DISTINCTCOUNT ( Surveys[Email address] ) ) perc A = DIVIDE ( COUNTROWS ( FILTER ( Surveys, Surveys[Primary Clicked] = TRUE &&(Surveys[Survey Title]="Survey upgrade" ) )), DISTINCTCOUNT ( Surveys[Email address] ) )See more details in the attached pbix file.
Pinky0404
8 years agoHelper III
Hi,
Here is the sample data set .
Eric_Zhang
8 years agoMicrosoft Employee
Pinky0404 wrote:
Hi,
Here is the sample data set .
You need to union those 3 tables
Surveys = UNION(Survey1,Survey2,Survey3)
Then create measures as
perc A & B & C =
VAR summizedTbl =
SUMMARIZE (
FILTER ( Surveys, Surveys[Primary Clicked] = TRUE ),
Surveys[Email address],
"CNT", DISTINCTCOUNT ( Surveys[Survey Title] )
)
RETURN
DIVIDE (
COUNTROWS ( FILTER ( summizedTbl, [CNT] = 3 ) ),
DISTINCTCOUNT ( Surveys[Email address] )
)
perc A & B =
VAR summizedTbl =
SUMMARIZE (
FILTER ( Surveys, Surveys[Primary Clicked] = TRUE &&(Surveys[Survey Title]="Survey upgrade"||Surveys[Survey Title]="Survey Apple") ),
Surveys[Email address],
"CNT", DISTINCTCOUNT ( Surveys[Survey Title] )
)
RETURN
DIVIDE (
COUNTROWS ( FILTER ( summizedTbl, [CNT] = 2 ) ),
DISTINCTCOUNT ( Surveys[Email address] )
)
perc A =
DIVIDE (
COUNTROWS ( FILTER ( Surveys, Surveys[Primary Clicked] = TRUE &&(Surveys[Survey Title]="Survey upgrade" ) )),
DISTINCTCOUNT ( Surveys[Email address] )
)
See more details in the attached pbix file.
- Pinky04048 years agoHelper III
Thanks alot. Appreciate your help.