Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have been doing some research on using slicer values for create dynamics measures. However, I am looking for some clarity of developing the measure, since this is my first run at it.
I have two tables:
TableA has columns [Status] and [Decision Date]
TableB has one column [Unique Decision Dates]
TableB has no relationship with TableA.
I am trying to use the new date slider option that was released in the latest version of PowerBI. I have the date slider using the values from TableB.[Unique Decision Dates]. The slider is including values “Before” the selected slider date.
Here is the measure that I am trying to accomplish.
If TableA.[Status] = “XX” or “XY” then “Yes”
If TableA.[Status] = “XT” or “XZ” and TableA.[Decision Date] <= TableB.[Unique Decision Dates] then “N” else “Y”
Thoughts on how best to accomplish this?
It is really not clear what you are trying to do. Can you post some sample workbook and show the output you are expecting?
Here is a link to an example PowerBI file.
Raw data looks like:
I would want to create a new column that has values of something like 'Yes' or 'No' or '0' or '1' in TableA where if TableA.[Status] = 'XX' or 'XY' the result would be 'Yes', but if 'XT' or 'XZ' if would determine whether the result is 'Yes' or 'No' based on if TableA.[Decision Date] is <= to the Max date the user selects on the date slider that is pulling from TableB. I would use the 'Yes' or 'No' reuslt to filter the TableA results.
As an example, if the user set 1/11/16 the result would look like:
Join your 2 tables on date.
Write this measure
Min Selected Date = FIRSTDATE(TableB[UNIQUE DECISION DATE])
and this
Display Result = if(HASONEVALUE(TableA[STATUS]), if(VALUES(TableA[STATUS]) in ("XX", "XY"),"Yes","No"), if(min(TableA[Decision Date]) >=[Min Selected Date],"Y","N"))
I'm not sure if my logic is quite right, but you can probably fix it from there.
Here is the workbook https://www.dropbox.com/s/5vilq70ai8b02kq/Example.pbix?dl=0
Note that the in statement above is new. It is not supported in the intellisense, but it does work.
User | Count |
---|---|
126 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
116 | |
102 | |
71 | |
61 |