true
3 TopicsHelp with formula including SWITCH, TRUE, ISBLANK
Hey guys, I have this column called COOKIE_ID and a column VISIT_ID. I want to figure out if a visitor (identified by COOKIE_ID) comes for the first time or is a returning visitor or an annonymous visitor. For this I figured I write the following formula: Cookie Status = VAR SelectedDateRange = DATESBETWEEN ( 'OD - All Page Visits Portal'[PAGE_LOAD_DATE], MIN ( 'OD - All Page Visits Portal'[PAGE_LOAD_DATE] ), MAX ( 'OD - All Page Visits Portal'[PAGE_LOAD_DATE] ) ) VAR CookieVisits = CALCULATETABLE ( VALUES ( 'OD - All Page Visits Portal'[COOKIE_ID] ), ALLEXCEPT ( 'OD - All Page Visits Portal', 'OD - All Page Visits Portal'[COOKIE_ID] ), SelectedDateRange ) VAR VisitCount = CALCULATE ( DISTINCTCOUNT ( 'OD - All Page Visits Portal'[VISIT_ID] ), ALLEXCEPT ( 'OD - All Page Visits Portal', 'OD - All Page Visits Portal'[COOKIE_ID] ), SelectedDateRange ) RETURN SWITCH ( TRUE (), ISBLANK ( 'OD - All Page Visits Portal'[COOKIE_ID] ), "Anoniem", VisitCount > 2, "Terugkerend", VisitCount = 1, "Nieuw", "Onbekend" ) For some odd reason though I can't select the column COOKIE_ID in ISBLANK. See picture below What am I doing wrong here?Solved1.7KViews0likes6CommentsIF calculation where IF dimension contains Text then Text (with ELSEIF conditions)
Hello! I’m a Tableau user switching over to Power BI/DAX. I’m trying to replicate a Tableau calculation I had but having trouble figuring out the best approach in Power BI/Query. I am looking for an IF Contains THEN formula for multiple instances... Here is the calculation in Tableau: IF CONTAINS ([Campaign Name], “XYZ”) Then “XYZ Campaign” ELSEIF CONTAINS ([Campaign Name], “ABC”) Then “ABC Campaign” ELSEIF CONTAINS ([Campaign Name], “JKL”) Then “JKL Campaign” END Thanks!Solved654Views0likes1CommentTrue/False based on Multiple Column Conditions
Good afternoon all, Was hoping for some assistance. I am currently working on a Power Bi project where I need to specify whether an action is past due based on if any of the other steps are past due. There are 3 steps ICA, RCCA, and PCA for one document number. That can show past due "Not Complete" and "Past Due". Filtering does not seem to calculate correctly. I have tried a few suggestions that I have found and nothing seems to be working. This is what I am working with right now. NCR Past Due = Calculate(True(),('Audit Findings Data','Audit Findings Data'[ICA Completed]= "Complete",'Audit Findings Data'[ICA PAST DUE]= "Past Due",'Audit Findings Data'[RCCA Completed]="Complete",'Audit Findings Data'[RCCA Past Due]= "Past Due",'Audit Findings Data'[PCA Submitted ?]= "Complete", 'Audit Findings Data'[PCA Submission PAST DUE]= "Past Due")Solved5KViews0likes4Comments