Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello guys.
I am trying to find a way to execute the above calculation with DAX.
I have Table1 with 4 columns (Username, TN, ID_number, Date)
1) The first step I want to do is to filter table1 by username (whatever starts with "A" for example) and create a new sub-table (table1A). (I have done that in Power Query)
2) Then I want to make a list of unique TNs from table1A (something like a key),
3) Filter the initial table1 only with these TNs, keep only the rows that the table1(Date) > table1A(date) and then count the ID_numbers
I forgot to mention that after the first step that i did in poiwer query I went to power bi and create a relationship between table1 TNs and tableA1 TNs in a way to try to make my model check the usernames from table1A use the TN value from that table row and check all same TNs from initial table1 and then count the ID-numbers for these rows. I am not quiet sure that this thing (relationship table1[TN] - table1A[TN] works. Also, the problem remains because I want to count only the ID_numbers that come from rows (that matche TNs) and are after the table1A Date value for every TN
Any help
Hi @Anonymous
It seems you may try to use GENERATE function like this post.If it is not your case,could you follow the How to Get Your Question Answered Quickly to post your simple assumed data and expected output.It would be better if you can upload the .pbix file to OneDrive and post the link here.
Regards,
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
76 | |
53 | |
37 | |
31 |
User | Count |
---|---|
101 | |
56 | |
51 | |
45 | |
40 |