Forum Discussion

gaurav8494's avatar
gaurav8494
Frequent Visitor
3 years ago
Solved

Measure as Filter

Hi All,
 
I have 2 measures, used to calculate Open deals and lost deal.
I have created a tabular view to display all the deals and income and other related fields. Mow I want to add the measure lost and open as slicer and this table should respond if I select open or lost and if I dont select anything or both.
I checked few solutions on youtube and I have created a DAX for that, but it's not able to filter out the data in the tabular view. 

 

 
Lost Funding Deal = CALCULATE([Funding Leads], 'Deal'[Stage]="Lost")
Open Deals (All) = calculate([Open Funding Deal],All('Date'))
 
# deal by stat =
VAR op = [Open Deals (All)]
return
IF(
    HASONEVALUE('Table'[stat]),
    SWITCH(TRUE(),
    VALUES('Table'[val])=1, op,
    VALUES('Table'[val])=2, [Lost Funding Deal])
    )
 
 

2 Replies