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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MyPowerbi2020
Helper IV
Helper IV

Need Help With DAX

MyPowerbi2020_0-1598179485236.png

Dear All,

Can you please help with the above questions.

 

Thanks.

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @MyPowerbi2020 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

c1.png

 

You may create a measure as below.

Max Value of Clicked = 
var tab = 
SUMMARIZE(
    'Table',
    'Table'[Email],
    "Result",
    CALCULATE(
       MAX('Table'[Clicked]),
       FILTER(
           ALLSELECTED('Table'),
           'Table'[Email]=EARLIER('Table'[Email])
       )
    )
)
return
MAXX(
    tab,
    [Result]
)

 

Result:

c2.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-alq-msft
Community Support
Community Support

Hi, @MyPowerbi2020 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

c1.png

 

You may create a measure as below.

Max Value of Clicked = 
var tab = 
SUMMARIZE(
    'Table',
    'Table'[Email],
    "Result",
    CALCULATE(
       MAX('Table'[Clicked]),
       FILTER(
           ALLSELECTED('Table'),
           'Table'[Email]=EARLIER('Table'[Email])
       )
    )
)
return
MAXX(
    tab,
    [Result]
)

 

Result:

c2.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anand24
Super User
Super User

Hi @MyPowerbi2020,

 

This should be easy enough for the initial requirement you have provided in query:

1. Take a Slicer and pull Date in it

2. Take a table visualization and pull Email & clicked fields in its values

3. Make sure "clicked" field's aggregation is set to maximum

 

Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query !!!

 
Greg_Deckler
Super User
Super User

@MyPowerbi2020 - I'm with @Fowmy , only things I will add is maybe use a Card visualization, put Clicked in it and do the default Maximum as @Fowmy suggests. And here are some additional resources that may help.

 

Please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Fowmy
Super User
Super User

@MyPowerbi2020 

I am not sure about your exact requirement

Can you share some sample data and the expected result to have a clear understanding of your question?
You can save your files in OneDrive, Google Drive, or any other cloud sharing platforms and share the link here.


You can drop the Email ID  and Clicks fields on a table Visual and select the required aggregation

Fowmy_0-1598180192090.png

____________________________________
How to paste sample data with your question?
How to get your questions answered quickly?

_____________________________________
Did I answer your question? Mark this post as a solution, this will help others!.

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube, LinkedIn


I

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thanks @Fowm for you help.

the input data is this:(Please consider the input data tab)

 

https://drive.google.com/file/d/1iZGAcXAye5xlyshEgpg9IGiiHqEXQF0h/view?usp=sharing

 

Requirement:

basically based on the date selection if the max value for Clicked column is 1 aganst the Email then Email should be treated as Clicker.

 

Example output (as given in the output data tab):

Here for this output data , the logic is - user has selected 2 dates : 20th August & 21st August , since for the email ABC the max value of the column clicked (in the input data) is 1 in the given data range , the Email ABC needs to be treated as Clicker.

Thanks.

 

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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