Forum Discussion
SoupyNoodles14
2 years agoFrequent Visitor
Calculated Values in a Chart
Below is a table that I built in SQL using a cross join for each customer visit-priorService, where we provide an "as of" list of prior services done for each customer visit to a store. At visit 1, c...
- 2 years ago
Unfortunately it did not, but thank you for trying. FYI, when I initially posted this, it was flagged as spam incorrectly and so I re-posted the question here: https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Create-Dynamic-Measure-of-Distinct-Counts/m-p/4117855#M163477. The solution is working there. Someone at Microsoft un-flagged this original post.
Anonymous
2 years agoNot applicable
Hi SoupyNoodles14 ,
Depend on your description, maybe you can try formula like below to create measures:
Prior Service Count Per Visit =
CALCULATE (
DISTINCTCOUNT ( 'Priors'[PriorServiceID] ),
ALLEXCEPT ( 'Priors', 'Priors'[VisitID] )
)
Prior Services Count =
CALCULATE (
DISTINCTCOUNT ( 'Priors'[PriorServiceID] ),
FILTER(Priors,[Measure] = 0)
)
Visit Count = CALCULATE ( DISTINCTCOUNT ( 'Priors'[VisitID] ) )Measure = IF(MAX(Priors[PriorServiceID]) = BLANK(),1,0)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.