cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User III
Super User III

Re: NEED HELPS IN TABLE DAX FUNCTION

@thangtruong 

No worries. You were actually quite close already, only a minor modification was missing. Just a matter of some more practice.

On a different, note please always show your sample data in text-tabular format in addition to (or instead of) the screen captures. A screen cap doesn't allow people to readily copy the data and run a quick test and thus decreases the likelihood of your question being answered. Just use 'Copy table' in Power BI and paste it here. Or, ideally, share the pbix  (which is what you did at the end and got you the solution pretty quickly :-). Beware of confidential data.

Cheers

 

   

 

thangtruong Advocate I
Advocate I

Re: NEED HELPS IN TABLE DAX FUNCTION

@AlB thanks for your comment :))

Sorry for disturbing you again, but another problems come ups.

Thanks to your helps, I already got the result of Accumulated Created Users.

The final result I want is % Active in day = Divide ( Number of active user in day ; Accumulated Created Users)

To calculated Number of active users in day, I used this DAX:

Active users in day = DISTINCTCOUNT('LOGIN TABLE'[email])

To calculated % Active in day, I used this DAX:

% Active in day = 
DIVIDE([Active users in day], SUM('CREATED USERS'[Accumulated Users]))

But here is the result:

pic 12.PNG

 

The correct resutl should be like that:

7/17/2019 16 10 10/16

7/18/2019 16 15 15/16

7/19/2019 16 14 14/16

7/20/2019 16 10 10/16

7/21/2019 16 2 2/16

7/22/2019 16 10 10/16

7/23/2019 17 13 13/17

....

 

I dont know what DAX should be used in this case 😞

I also attached the file and raw data in the link below. Please kindly take a look

https://drive.google.com/drive/folders/1yzpTgsXTbPLNS-hdIAjsdhq-f-wwdjdt?usp=sharing

 

Thank you so much 😞 

Super User III
Super User III

Re: NEED HELPS IN TABLE DAX FUNCTION

@thangtruong 

Considering what you are trying to do now, I think the table we created earlier is not very useful. I'd suggest the following:

1. Create a one-to-many relationship between DATE and USER (Date --> Created Date)

2. Create a measure that will do the cumulative directly on the visual:

Measure_Accumulated_Users =
CALCULATE (
    COUNT ( 'USER'[email] );
    FILTER ( ALL ( 'DATE'[Date] ); 'DATE'[Date] <= MAX ( 'DATE'[Date] ) )
)

 This will give you a value in all rows. Then you can update your other two measures accordingly, using [Measure_Accumulated_Users]

 

View solution in original post

thangtruong Advocate I
Advocate I

Re: NEED HELPS IN TABLE DAX FUNCTION

@AlB I dont know what to say right now. It's all solved now.

Now my reports are working.

Really appreciate, Mr/Mrs @AlB 

 

Super User III
Super User III

Re: NEED HELPS IN TABLE DAX FUNCTION

@thangtruong 

Great. My pleasure. It's always nice to come across someone so grateful.

Cheers

 

Helpful resources

Announcements
‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors