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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Gopal_PV
Helper II
Helper II

How to design model and relationship from snowflake views

Hi Folks,

I am having source as Snowflake datamart views. The business have created multiple views on specific logic. Now i want to created reports on that. 

Can you please help me on how to give relationship between these tables using below sample data . Can you please help me on the modelling. 

Inputdata view from snowflake

    Date View   
CALENDAR_DATEYEARMONTHDAYYEAR_MONTHDATE_STRDAY_OF_WEEK_NAMEDAY_OF_WEEK_NUMBER
1/1/20152015112015-011/1/2015Day4
1/2/20152015122015-011/2/2015Day5
1/3/20152015132015-011/3/2015Day6
1/4/20152015142015-011/4/2015Day0
1/5/20152015152015-011/5/2015Day1
        
    Units View   
YEARMONTHACCOUNTIDNAMEBEGINNING_OF_PERIOD_UNITSNEW_UNITSEXPANSION_UNITSCONTRACTION_UNITS
2020513Netflix0300
2020514Hotstar0000
2020613Prime30160
2020614Voot0000
2020713Youtube19000
2020714Sony0000
2020813Aha19010
2020814Mx Player0000
        
    Screening View   
YEARMONTHACCOUNTIDNAMEBEGINNING_OF_PERIOD_SCREENINGNEW_SCREENINGEXPANSION_SCREENINGCONTRACTION_SCREENING
2021418Liv0000
2021422Netflix0000
2021518Hotstar0000
2021519Prime0000
2021522Voot0000
2021523Youtube0000
2021524Sony0000
2021525Aha0000
2021526Mx Player0000
        
    Subscription View   
YEARMONTHACCOUNTIDNAMEBEGINNING_OF_PERIOD_SUBSNEW_SUBSEXPANSION_SUBSCONTRACTION_SUBS
2021418Liv049800
2021422Netflix0142.500
2021518Hotstar49807.50
2021519Prime04900
2021522Voot142.501.50
2021523Youtube0193200
2021524Sony09900
2021525Aha09900
2021526Mx Player0109.500
        
    Payments View   
YEARMONTHACCOUNTIDNAMEBEGINNING_OF_PERIOD_PAYMENTSNEW_PAYMENTSEXPANSION_PAYMENTSCONTRACTION_PAYMENTS
2021418Liv01126.5800
2021422Netflix0208.200
2021518Hotstar1126.580224.760
2021519Prime0179.400
2021522Voot208.209.60
2021523Youtube03553.5900
2021524Sony0000
        
    AAS View   
YEARMONTHACCOUNTIDNAMEBEGINNING_OF_PERIOD_PAYMENTSNEW_PAYMENTSEXPANSION_PAYMENTSCONTRACTION_PAYMENTS
2021418jio01126.5800
2021422Liv0208.200
2021518Netflix1126.580224.760
2021519Hotstar0179.400
2021522Prime208.209.60
2021523Voot03553.5900
2021524Youtube0000
2021525Sony0541.7200
    TotChargesRevenue View   
YEARMONTHACCOUNTIDNAMEBEGINNING_OF_PERIOD_TOTALREVENUENEW_TOTALREVENUEEXPANSION_TOTALREVENUECONTRACTION_TOTALREVENUE
2018815jio0116.3800
2018830Liv01195.500
2018835Netflix038.6200
2018841Hotstar010000
2018843Prime010000
2018858Voot0354000
20188117Youtube087.3900
   Sony    
4 REPLIES 4
v-agajavelly
Community Support
Community Support

Hi @Gopal_PV ,

Just following up to see if you had a chance to try reshaping your snowflake views into a star schema as outlined above. Were you able to set up the date and account dimensions and link everything up cleanly in the model?

Let us know how it's going or if you'd like any sample M-code, DAX formulas, or help troubleshooting specific parts. Happy to assist further.

Regards,
Akhil.

v-csrikanth
Community Support
Community Support

Hi @Gopal_PV 
Thanks for reaching out to the Fabric community.
To get all of your Snowflake views working together smoothly in Power BI, you can reshape them into a classic star schema:

Create a proper Date dimension:

  • In Power Query, point at your Calendar Date view.
  • Rename the date column to DateKey (type “Date”) and keep only the extra fields you actually need (Year, Month, MonthName, DayOfWeek, etc.).
  • Load that table and, on the Modeling ribbon, mark it as your Date table.

Build one Account lookup table:

  • Pull in each of your metric views (Units, Screening, Subscription, Payments, AAS, TotChargesRevenue).
  • In each query, remove all columns except ACCOUNTID and NAME.
  • Append them all together, remove duplicates, and call the result DimAccount.

Turn each view into its own fact table:

  • In the Units query (and repeat for the others), add a custom column:
DateKey = #date([YEAR], [MONTH], 1)
  • Hide or delete the original YEAR/MONTH columns if you like, and rename your measure columns (e.g. NewUnits, ExpansionUnits).
  • Load each one into the model under a new name (FactUnits, FactScreening, etc.).

Hook up your relationships:

  • In the diagram view, drag DimDate[DateKey] onto each fact table’s DateKey (one-to-many, single-direction).
  • Then link DimAccount[ACCOUNTID] to each fact table’s ACCOUNTID.
  • Every relationship should flow from dimension → fact, not the other way around.

Build your visuals off that star:

  • Always use fields from your dimensions (Year, Month, Account Name) on your axes, slicers, or filters.
  • Pull your measures (for example SUM(FactUnits[NewUnits])) straight from the fact tables into charts or cards.

With this pattern you’ll avoid accidental inner joins, keep every row of your metrics, and be able to slice by date or by account without lookup failures. Let me know if you’d like any sample M-code or DAX formulas to get it working!

 

Thanks 
Cheri Srikanth
CST_Community Team

speedramps
Super User
Super User

It is best pratice to convert year and month to a date key

eg date = 01 / month / year

 

Then merge all the similare fact tables into one multi-purpose fact table 

 

speedramps_0-1753392436959.png

Please click thumbs up and [accept solution]

Hi @speedramps 

Thank you for your reply. But My views are having multiple sql logics are included with business conditions. I cannot merge. Can you please help me with what is the relationship i need to give between the views table in power bi model. 
If you can help me same kind visual represent would great help for me.

Thank you for your time

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors