Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have a requirement in power bi dax.
I have two tables with columns as below:
Certifications:
1. Certification Name
2. Asset ID
Fact Table :
1.User ID
2.User Name
3. Access Date
4. Asset ID
5. Completed Date
Both tables are mapped to each other using asset id using many to many relationship. ( same asset can be part of multiple certificates)
Dim: Role Playing Date: Is date table which is mapped to fact table using access date using one to many
Measures Used:
Content_launch = user id & asset id
For example 0.-30 Days is Date diff of Min(access date) and Max (acccess date)
I want to create a table as mentioned in the image . which will show how many users are in what % of certification in days mentioned. It should be dynamic based on date selection also.
Also if i filter it with certification name it should display corresponding details to the certification.
Thanks,
Binay
Solved! Go to Solution.
Hi @binayjethwa ,
Thanks for reaching out to the Microsoft fabric community forum.
Thanks for your prompt response
Could you please provide sample data that fully represents the issue or question you're referring to? Kindly ensure the data is in a usable format (e.g., Excel or CSV) rather than a screenshot, and does not contain any sensitive or unrelated information.
Looking forward to your response.
Best regards,
Lakshmi Narayana
Hi @binayjethwa ,
Thanks for reaching out to the Microsoft fabric community forum.
Thanks for your prompt response
Could you please provide sample data that fully represents the issue or question you're referring to? Kindly ensure the data is in a usable format (e.g., Excel or CSV) rather than a screenshot, and does not contain any sensitive or unrelated information.
Looking forward to your response.
Best regards,
Lakshmi Narayana
Hi @binayjethwa ,
I wanted to follow up and confirm whether you’ve had a chance to review the information shared by @DataNinja777 . If you have any questions or need further clarification, please don’t hesitate to reach out.
If you're still encountering any challenges, feel free to let us know we’d be glad to assist you further.
Looking forward to your response.
Best regards,
Lakshmi Narayana
I still see issues as i am not getting output.
Hi @binayjethwa ,
Thank you for your response.
To better understand the issue and build the appropriate logic, it would be very helpful if you could share some sample data that fully represents the problem or question you're referring to.
Kindly ensure the data is:
In a usable format (e.g., Excel or CSV), rather than a screenshot
Free of any sensitive or unrelated information
Looking forward to your response.
Best regards,
Lakshmi Narayana
Hi @binayjethwa ,
I'm following up to check whether your issue has been resolved. If it has, we kindly encourage you to mark the most helpful reply as the accepted solution. This helps other community members find answers more efficiently when facing similar challenges.
If you're still encountering any issues, we’d be happy to assist further. To help us understand the problem better, please provide a sample dataset in a structured text format (not as an image). Ensure the data is relevant, free from sensitive information, and clearly illustrates the issue you're experiencing. Additionally, sharing the expected outcome based on the provided data will enable us to offer a more accurate solution.
Please feel free to reach out with any questions or clarifications we're here to help.
Looking forward to your response.
Best regards,
LakshmiNarayana
Hi @binayjethwa ,
I'm following up to check whether your issue has been resolved. If it has, we kindly encourage you to mark the most helpful reply as the accepted solution. This helps other community members find answers more efficiently when facing similar challenges.
If you're still encountering any issues, we’d be happy to assist further. To help us understand the problem better, please provide a sample dataset in a structured text format (not as an image). Ensure the data is relevant, free from sensitive information, and clearly illustrates the issue you're experiencing. Additionally, sharing the expected outcome based on the provided data will enable us to offer a more accurate solution.
Please feel free to reach out with any questions or clarifications we're here to help.
Looking forward to your response.
Best regards,
LakshmiNarayana
Hi @binayjethwa ,
To achieve this, you'll first create a calculated table to group the completion times into buckets like "0-30 days". Then, you will write a series of DAX measures—one for each column in your desired table—that count the users who fall into these buckets. Before you begin, it's essential that your data model has an active relationship from your date table to Fact Table[Access Date] and an inactive relationship from your date table to Fact Table[Completed Date]. This setup is key to dynamically filtering by completion dates.
First, create a calculated table that defines the time buckets. In Power BI, select New table and enter the following DAX expression. After creating it, remember to select the Category column and use the "Sort by column" feature to sort it by the SortOrder column. This will ensure your table visual's rows are in the correct order.
DaysBucket =
DATATABLE (
"Category", STRING,
"MinDays", INTEGER,
"MaxDays", INTEGER,
"SortOrder", INTEGER,
{
{ "0-30 days", 0, 30, 1 },
{ "31-60 days", 31, 60, 2 },
{ "61-90 days", 61, 90, 3 },
{ "91-120 days", 91, 120, 4 },
{ "121-180 days", 121, 180, 5 },
{ "180+ days", 181, 10000, 6 }
}
)
Next, you will create the DAX measures. Each measure will be built on a reusable logic that generates a temporary summary table, UserStats. This virtual table is calculated on the fly and contains the key metrics for each user based on any active slicers: their total number of completed certifications and the number of days it took from their first access to their final completion. This is where the inactive relationship is activated using USERELATIONSHIP to filter completions by the selected date range.
The first measure calculates the total number of users for each time bucket, which will become the first column in your table.
Users (Total) =
VAR UserStats =
ADDCOLUMNS (
SUMMARIZE (
CALCULATETABLE(
'Fact Table',
USERELATIONSHIP('Fact Table'[Completed Date], 'Dim: Role Playing Date'[Dim Date]),
NOT ISBLANK('Fact Table'[Completed Date])
),
'Fact Table'[User ID]
),
"TotalCompletions", CALCULATE ( DISTINCTCOUNT ( 'Fact Table'[Asset ID] ) ),
"DaysToComplete",
CALCULATE (
DATEDIFF ( MIN ( 'Fact Table'[Access Date] ), MAX ( 'Fact Table'[Completed Date] ), DAY )
)
)
VAR MinDays = SELECTEDVALUE ( 'DaysBucket'[MinDays] )
VAR MaxDays = SELECTEDVALUE ( 'DaysBucket'[MaxDays] )
VAR Result =
COUNTROWS (
FILTER (
UserStats,
[DaysToComplete] >= MinDays && [DaysToComplete] <= MaxDays
)
)
RETURN Result
Now, create the measure for your next column, which filters for users who completed a specific number of certifications. This follows the exact same pattern as the Users (Total) measure but adds a condition to filter the TotalCompletions for each user.
Users 1-30 Certs =
VAR UserStats =
ADDCOLUMNS (
SUMMARIZE (
CALCULATETABLE(
'Fact Table',
USERELATIONSHIP('Fact Table'[Completed Date], 'Dim: Role Playing Date'[Dim Date]),
NOT ISBLANK('Fact Table'[Completed Date])
),
'Fact Table'[User ID]
),
"TotalCompletions", CALCULATE ( DISTINCTCOUNT ( 'Fact Table'[Asset ID] ) ),
"DaysToComplete",
CALCULATE (
DATEDIFF ( MIN ( 'Fact Table'[Access Date] ), MAX ( 'Fact Table'[Completed Date] ), DAY )
)
)
VAR MinDays = SELECTEDVALUE ( 'DaysBucket'[MinDays] )
VAR MaxDays = SELECTEDVALUE ( 'DaysBucket'[MaxDays] )
VAR Result =
COUNTROWS (
FILTER (
UserStats,
[DaysToComplete] >= MinDays && [DaysToComplete] <= MaxDays &&
[TotalCompletions] >= 1 && [TotalCompletions] <= 30
)
)
RETURN Result
You can create the rest of your required measures by simply copying the Users 1-30 Certs measure and adjusting the filter condition for the completion count. For example, the filter for your "31-80" bucket would be [TotalCompletions] >= 31 && [TotalCompletions] <= 80, and the filter for "100+" would be [TotalCompletions] >= 100.
Finally, build your visual. Drag a Table visual onto the Power BI canvas. Add the DaysBucket[Category] field, followed by each of the measures you created (Users (Total), Users 1-30 Certs, etc.) into the Values field well. When you add slicers for your date dimension or certification names, the entire table will dynamically update.
Best regards,
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |