Forum Discussion
How can i recreate this logic in Power BI ?
The visual is providing user to interact with the data using the parameter. they can select parameter value(DueInDays)ranging from 1-30 days and then see the number of jobs due as per selection.
For eg ; if the user is selecting 3 , they will be able to see the number of jobs due in next 3 days .
Logic behind :- In tableau i am passing the parameter value selected by the user in one of the calculated field :
IF [Status] <> "Completed" THEN
if(DATEDIFF('day',DATEADD('day',int([DueInDays]),NOW()), [Due Date])<0 AND isnull([Date Completed]))
THEN "Overdue"
ELSE "Not Due"
END
ELSE
"Completed"
END
and its helping the view to update everytime user is selecting different value .
4 Replies
- amitchandak
Super User
Try like
IF ([Status] <> "Completed" ,if(datediff(Today()+ ([DueInDays]*1), [Due Date],day)<0 && isblank([Date Completed]), "Overdue" , "Not Due" ) , "Completed" )- AnonymousNot applicable
Hi Amit,
I created the new column but the values are not changing when I am updating the DueInDays parameter value from the report view .
- amitchandak
Super User
Then you need a measure.Can you share sample data and sample output. If possible please share a sample pbix file after removing sensitive information.Thanks.