Forum Discussion
How to divide semantic model for specific range of dates from OneLake ?
- 1 year ago
Hi jaryszek
Thanks for reaching out again.
in this case we can create self service BI Model with RLS/OLS as mentioned by v-pgoloju.
the data model may look like below:
- there will be one fact table which will have data at day level and another fact table at year/month level(based on your requirement ).
- Date dimension will be connected at day granularity to day fact table
- Date dimension will be connected at year/month granularity to year/month fact table.
- Other dimensions will be connected based on keys.
then you can design RLS/OLS.(in OLS you can create a role who will see day level fact table and another role who will see year/month level fact table)
Thanks & Regards,
Praful Potphode
hi jaryszek,
Thank you for reaching out to the Microsoft Fabric Forum Community.
You have a full dataset in Parquet format, and you want to create separate models for Last 7 days, Full month
Here’s how you can do it: Use Notebooks or Dataflows Gen2
Notebooks let you write simple Python or Spark code to filter your data by date.
Dataflows Gen2 let you use a visual interface (like Power Query) to do the same thing without writing code.
Once filtered, Save each filtered dataset as a new table in your Lakehouse.Then, build a separate semantic model in Power BI for each table.
This way, you’ll have: One model showing just the last 7 days, another showing the full month and so on.
You mentioned that relationships are already created in your semantic model, but you want to restrict or control them
Use Role-Level Security (RLS)
In Power BI, you can define roles that control what data users see.
You can use DAX filters to limit data based on dates or other fields.
Example: A role that only sees data from the last 7 days.
Use Separate Models
Since you’re already splitting the data by date, each semantic model can have its own relationships.
This avoids the need to dynamically restrict relationships.
Manual Relationship Control
In Power BI Desktop, turn off Auto Detect Relationships.
Manually define only the relationships you want.
This gives you full control over how tables connect.
Thanks & Regards,
Prasanna Kumar
- jaryszek1 year ago
Super User
Thank you.
"build a separate semantic model in Power BI for each table"
Yes, this is a good direction.
Assuming I have the same baseline model with the same schema and only want to change data granaularity within model, how can i achive that?
Imagine user wants to compare year 2024 on Months but after that he wants to compare last 7 days with 2 weeks ago. I have different granularity for it so it means i have data in different semantic models.
How I can get proper data based on user slicer selections? How to change attached semantic models? How to read them ?
Best,
Jacek