The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi
I need to calculate a distinct policy based on from dt and to date from the policy table. I also have a calendar dates table which is a calculated table. User will choose the date in dates table and based on user selection I need to calculate the policycount based on the interval selected in dates table. Suppose if the user chose between 1-jan-2023 and 31-jan-2023 I need to get the policy count from policy table as from_dt<=31-jan-2023 and to_dt>=31-jan-2023
MAXPOLICYCOUNT =
VAR _max = MAX( Dates[Date] )
RETURN
CALCULATE (
DISTINCTCOUNT ( pol_table[POL_NO]) ,
pol_table[_DT_TO] >= _max , pol_table[_DT_FM] <= _max
)
Maxpolicycount1 = CALCULATE([MAXPOLICYCOUNT],USERELATIONSHIP(pol_table[_DT_TO],Dates[Date]))
the above result is correct this is expected (maxpolicycount1). But in dashboard i would be having dates slicer so when dates slicer is present all the values are showing as incorrect so i need to avoid the dates slicer and in above output u could find i have dt_to slicer. This dt_to slicer will not be available in dashboard therfore i need to include dt_to filter in the measure and exclude dates slicer from the measure. i tried to use datesbetween for dt to field but it says it has duplicate values for the column
Solved! Go to Solution.
No this will not work as the measure created is having max(date)
I created separate policy table unconnected with the date table and resolved this issue
Not sure if I understand but it seems like you don't want the date slicer to interact with the visual that does the count. If you click on the date slicer then go to Format and Edit Interactions you can stop the slicer from interacting with other visuals.
No this will not work as the measure created is having max(date)
I created separate policy table unconnected with the date table and resolved this issue
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
77 | |
73 | |
47 | |
39 |
User | Count |
---|---|
137 | |
108 | |
69 | |
64 | |
56 |