Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
select opportunity_status, sum(opportunity_value) as sum_opp_value from (
select distinct opportunity_id , opportunity_status ,opportunity_value
from web_analytics_dm.dm_behaviour_campaign_salesforce dbcs
where business_unit='SEF'
and "date"='20211201') a
group by opportunity_status
Hi @anjanikumar ,
You may try this measure
Measure=
VAR _table =
FILTER (
DISTINCT ( 'web_analytics_dm.dm_behaviour_campaign_salesforce dbcs' ),
[date] = DATE ( 2021, 12, 1 )
&& [business_unit] = "SEF"
)
RETURN
CALCULATE (
SUM ( 'web_analytics_dm.dm_behaviour_campaign_salesforce dbcs'[opportunity_value] ),
FILTER (
_table,
[opportunity_status]
= MAX ( 'web_analytics_dm.dm_behaviour_campaign_salesforce dbcs'[opportunity_status] )
)
)
If that doesn't work, hope to provide some dummy data and expected results.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@anjanikumar , You can create a measure like
sumx(summarize(filter(dm_behaviour_campaign_salesforce, [business_unit]="SEF" && [date]= Date(2021,12,01)), [opportunity_id] , [opportunity_status] ,[opportunity_value]), [opportunity_value])
and use with opportunity_status is any visual
Thank you so much for your response !!
want opportunity_status with Groupby .
Convert below query as DAX.
select opportunity_status, sum(opportunity_value) as sum_opp_value from (
select distinct opportunity_id , opportunity_status ,opportunity_value
from web_analytics_dm.dm_behaviour_campaign_salesforce dbcs
group by opportunity_status
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
11 | |
9 | |
6 |