Forum Discussion
mike_viz_lord
3 years agoFrequent Visitor
Apply Date Range Filter Based on Condition
I'm trying to add a date range filter to my report page based on Created Date. However, the Created Date filter should only apply to Record Type = "B" and return all records where Record Type = "A". ...
FreemanZ
Super User
3 years agoyou may use this code for further calculations:
VAR _table =
UNION(
CALCULATETABLE(
VALUES(data[Record ID]),
ALL(data[Created Date]),
data[Record Type]="A" ),
CALCULATETABLE(
VALUES(data[Record ID]),
data[Record Type]="B"
)
)
for example, tried to verify like:
Measure =
VAR _table =
UNION(
CALCULATETABLE(
VALUES(data[Record ID]),
ALL(data[Created Date]),
data[Record Type]="A" ),
CALCULATETABLE(
VALUES(data[Record ID]),
data[Record Type]="B"
)
)
RETURN
CONCATENATEX(_table, data[Record ID], ", ")it worked like: