Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Arvind123
Frequent Visitor

Help me to modify current dax to achieve condition.

Hi Team,

I have dax like.

Filtered Revenue > 500 =
CALCULATE(
    SUM('BT3 Keyword'[Total revenue]),
    FILTER(
        VALUES('BT3 Keyword'[Keyword]),
        SUMX(
            FILTER('BT3 Keyword', 'BT3 Keyword'[Keyword] = EARLIER('BT3 Keyword'[Keyword])),
            'BT3 Keyword'[Total revenue]
        ) > 500
    )
)

This gives me total value correct at keyword level But when I see on source level there is no value showing.
Where my keyword present in row level, Source in Column and Revenue in Value in matrix visual... It is
displaying value in column total and row total but when source value is less than 500 it is not showing that value
in matrix visual for particular source.
Here are particular keyword which have total value but did not have source value because it has less than 500 revenue
but I need to display that value because for condition if summing of source gives me 500 value then It has to be consider
and it is considering the keryword level but did not display source level revenue,Can someone please help me to modified the dax.
That gives me source level value too.
 
Arvind123_0-1708081886272.png
Something like this I want to achieve:-
Arvind123_1-1708082161228.png

 


Regards,

 

Arvind
7 REPLIES 7
Arvind123
Frequent Visitor

Hi @amitchandak ,

Please find the sample data.

KeywordRevenue Source
ab3072.301A
cd536.0652A
avd829.9001B
sef970.6752B
srfd1351.724B
ssww2676.865C
fgg938.9079C
treaq7.315659E
awrdew2.699883F
rt4dsa350.427F
AWEWSA3.079823F
SAFGERQA1.594021D
EWFRGEQE2.123724D
EWFREWDWQ3.431873D
45EGTVDSEW1.897625D
FRW11.6391D
EWGEW12.37913D

 

 

Thanks,

Arvind

amitchandak
Super User
Super User

@Arvind123 , You might have used GT for total revenue column

Either try this way (two measures)

 

M1 = SUMX(
FILTER(allselected('BT3 Keyword'), 'BT3 Keyword'[Keyword] = Max('BT3 Keyword'[Keyword])),
'BT3 Keyword'[Total revenue]
)

Filtered Revenue > 500 =
if(not(isinscope('BT3 Keyword'[Source])),
SUMX(FILTER(
VALUES('BT3 Keyword'[Keyword]),
[M1]> 500
),'BT3 Keyword'[Total revenue]), [M1])

 

Or (two measures)


M1 = SUM(
'BT3 Keyword'[Total revenue]
)

Filtered Revenue > 500 =
if(not(isinscope('BT3 Keyword'[Source])),
SUMX(FILTER(
VALUES('BT3 Keyword'[Keyword]),
[M1]> 500
),calculate(sum('BT3 Keyword'[Total revenue]))), [M1])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak ,

Thanks for your quick response!
Here by using your 2nd measure I am getting value of source, But It is also giving me value of those keywords whose total revenue after summing of all source revenue is not greater than 500 also.
I dont want those keywords whose revenue is less than 500.

for your reference this keywords should not be there by condition and by using your dax
the total value is showing blank for those keyword whose revemue is less than 500 where as if total is greater than 500 it is sowing in column total.

Arvind123_2-1708087987797.png

 

Regards,

Arvind

 

@Arvind123 ,
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak ,

Any modified dax you have for this?

Hi @amitchandak ,

 

Have you received the table?

Thanks,

Arvind

Hi Team,
@Anonymous 
@community24 
@Community2 

Can I get modified dax ..
@amitchandakhas provided me the dax like:

M1 = SUM(
'BT3 Keyword'[Total revenue]
)

Filtered Revenue > 500 =
if(not(isinscope('BT3 Keyword'[Source])),
SUMX(FILTER(
VALUES('BT3 Keyword'[Keyword]),
[M1]> 500
),calculate(sum('BT3 Keyword'[Total revenue]))), [M1])


This dax gives me right indication but it is also showing all the keyword who has not surpass the value 500.
The value who has achieved 500 more that gives me in total value for that particular keyword and who has not greater than 500 that shows me blank... So that blank value I don't want in my table.

Thanks,
Arvind

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.