Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have a Field that is counting Visits where I can filter specific Visits using "Visit is 1" or "Visit is 0".
How can I create measure that has the filter "Visit is 1" built in? This way I wont have to use a filter.
Thank you!
Solved! Go to Solution.
Thank you for your time and effort!
Here is the formula for visits ...
CALCULATE(
DISTINCTCOUNT(Dataset[Voucher_Number]),
[IsVisit] = 1)
Hi @jonnyA ,
You could use filter function.
https://docs.microsoft.com/en-us/dax/filter-functions-dax
Measure = calculate(countrows('table'),filter(allselected('table'),[Visits] = "Visit is 1"))
I'd like to suggest you to create a independent slicer.
https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-slicers
slicer = distinct('table'[visits])
Then modify the measure as bleow:
Measure = calculate(countrows('table'),filter(allselected('table'),[Visits] = selectedvalue('slicer'[visits])))
So that you don't have to create multiple measures for different [visits].
Best Regards,
Jay
Hi @jonnyA ,
You can create the following measure:
Visit 1 = CALCULATE(COUNT(Table[Visit]), Table[Visit] = "Visit is 1")
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThank you for your time and effort!
Here is the formula for visits ...
CALCULATE(
DISTINCTCOUNT(Dataset[Voucher_Number]),
[IsVisit] = 1)
User | Count |
---|---|
127 | |
108 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |