惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 【当耐特】
K
Kaspersky official blog
V
Vulnerabilities – Threatpost
Hacker News - Newest:
Hacker News - Newest: "LLM"
Security Archives - TechRepublic
Security Archives - TechRepublic
S
Secure Thoughts
I
Intezer
TaoSecurity Blog
TaoSecurity Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Spread Privacy
Spread Privacy
A
About on SuperTechFans
NISL@THU
NISL@THU
The GitHub Blog
The GitHub Blog
Hugging Face - Blog
Hugging Face - Blog
S
Security @ Cisco Blogs
S
SegmentFault 最新的问题
G
Google Developers Blog
B
Blog
N
News and Events Feed by Topic
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
V2EX - 技术
V2EX - 技术
V
Visual Studio Blog
MyScale Blog
MyScale Blog
Webroot Blog
Webroot Blog
Vercel News
Vercel News
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
Last Week in AI
Last Week in AI
Y
Y Combinator Blog
S
Security Affairs
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Stack Overflow Blog
Stack Overflow Blog
P
Proofpoint News Feed
L
Lohrmann on Cybersecurity
博客园 - 叶小钗
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Know Your Adversary
Know Your Adversary
T
Tailwind CSS Blog
F
Fortinet All Blogs
D
DataBreaches.Net
博客园 - Franky
博客园_首页
H
Heimdal Security Blog
宝玉的分享
宝玉的分享
阮一峰的网络日志
阮一峰的网络日志
Attack and Defense Labs
Attack and Defense Labs
Project Zero
Project Zero
雷峰网
雷峰网

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
CONFIGURING SEMANTIC MODEL IN POWER BI
Timothy Atinuke · 2026-05-31 · via DEV Community

INTRODUCTION

Configuring a Power BI semantic model involves refining data structures, creating relationships, and setting up calculations. Semantic model is the last stop in the data pipeline before reports and dashboards are built. It is the end product of the raw data that has been extracted, transformed, loaded, modeled, built relationship, and written calculation. The Semantic model consist of Data connections to one or more data sources,Transformations that clean and prepare the data for reporting, Defined calculations and metrics based on business rules to ensure consistent reports and Defined relationships between tables.

Key words to note in Semantic Modelling are;

1. Fact table and Dimension table:
The Fact table records the quantitative and numerical data. It is where every single details are recorded. The Dimension table act as the descriptive companion to the fact table, containing the attributes or characteristics that provide context to the data.

2. Primary and Foreign Key:
Primary Keys are unique identifier assigned to a specific record with a database table ensuring that no two rows are identical or repeated. foreign Keys are columns or group of columns in one table that provides a link between data in two tables by referencing the primary key of another.

3. Star Schema
Star Schema is a data modeling technique where a central fact table is surrounded by several dimension tables that provide descriptive content.

4. Cardinality
Cardinality defines the kind of relationship between two tables. They are;

  • One to Many (1.*)
  • Many to one (*.1)
  • One to One (1.1)
  • Many to Many (.) The cardinality of a relationship is described by the "one" (1) or "many" (*) icons located at the ends of the relationship line.

5. Cross Filter Direction
The direction determine how filters propagate. Possible cross filter options are dependent on the relationship cardinality type.

  • One to Many - Single or Both sides
  • One to One - Both sides
  • Many to Many - Single to either table or both The cross filter direction of a relationship is described by the arrows located in the middle of the relationship line.

6. Active and Inactive Relationship
An Active relationship is the primary relationship that is used by Power BI to calculate and filter data automatically.
An inactive relationship is a secondary relationship activated with the Power BI DAX function temporarily whenever there is a need to perform a specific calculation.
An active relationship is a solid line; an inactive relationship is a dotted line.

7. Disconnected Table
Disconnected Table is a table that doesn't need a relationship to another model table and are useful in what-if scenario or field parameters.

ARCHITECTURE OVERVIEW

In this blog, you learn how to:

  • Create model relationships.
  • Configure table and column properties.
  • Create hierarchies.
  • Create quick measures.
  • Configure a many-to-many relationship

A. Create Model Relationships
Data modeling is the process of organizing data into tables and creating relationships. The data model is a visual and structural blueprint that defines how data is stored, organized and related within a database.

STEPS

  1. In Power BI Desktop, to view all table fields, in the Data pane, right-click an empty area, and then select Expand All. Image 1
  2. To create a table visual, in the Data pane, from inside the Product table, check the Category field. Image 2
  3. To add another column to the table, in the Data pane, check the Sales | Sales field. Image 3
  4. Notice that the table visual lists four product categories, and that the sales value is the same for each, and the same for the total. This is because there isn't a model relationship between these tables. Image 4
  5. To switch to the model designer, at the left select the Model view icon. Image 5
  6. On the Home ribbon, select Manage Relationships. Image 6
  7. In the Manage Relationships window, notice that no relationships are yet defined. Image 7
  8. To create a relationship, select + New relationship. Image 8
  9. To configure a relationship from Product table to Sales table, in the From table dropdown list, select the Product table, and in the To table dropdown list, select the Sales table. Image 9
  10. The following properties were automatically configured:

B. Create additional relationships
New relationships in Power BI are also created through the drag and drop columns.

STEPS

  1. Firstly, switch to Model view.
  2. From the Reseller table, drag the ResellerKey column onto the ResellerKey column of the Sales table. Image 2
  3. In the New relationship window, review the configuration, and then select Save. Image 3
  4. Additional model relationships are created using the following; Region table to Sales table using SalesTerritoryKey columns as the common column for both tables. Salesperson table to Sales table, using the EmployeeKey columns as common key for both tables.
  5. In the model view diagram, tables are arranged so that the Sales table is positioned in the center of the diagram, and the related tables are arranged about it. (Disconnected tables are positioned to the side). Image 5
  6. Save the Power BI Desktop file.

C. Configure the Product table
In this task, you'll configure the Product table with a hierarchy and display folder.

STEPS

  1. Switch to Model view.
  2. In the Data pane, if necessary, expand the Product table to reveal all fields. Image 2
  3. In the Product table, right-click the Category column, and the select Create hierarchy. Image 3
  4. In the Properties pane, in the Name box, replace the value with Products. Image 4
  5. To add levels to the hierarchy, in the Hierarchy dropdown list, select Subcategory and then select Product, and then select Apply Level Changes. Image 5
  6. In the Data pane, notice the Products hierarchy. To reveal the hierarchy levels, expand it. Image 6
  7. To organize columns into a display folder, in the Data pane, first select the Background Color Format column. Image 7
  8. While pressing the Ctrl key, select the Font Color Format column. Image 8
  9. In the Properties pane, in the Display Folder box, enter Formatting. Image 9 10.In the Data pane, notice that the two columns are now inside a folder. Image 10

D. Configure the Region table
This task configures the Region table with a hierarchy and updated categories.

STEPS

  1. In the Region table, create a hierarchy named Regions, with the three levels: Group, Country and Region. Image 1
  2. Select the Country column (not the Country hierarchy level). Image 2
  3. In the Properties pane, expand the Advanced section (located at the bottom of the pane), and then in the Data Category dropdown list, select Country/Region. Image 3

E. Configure the Reseller table
This task configures the Reseller table to add a hierarchy and update data categories.

STEPS

  1. In the Reseller table, create a hierarchy named Resellers, with the two levels, Business Type and Reseller Image 1
  2. Create a second hierarchy named Geography, with the following four levels: Country-Region, State-Province, City, and Reseller Image 2
  3. Set the data category for the following columns (not within the hierarchy):
  • Country-Region to Country/Region
    Image 3a

  • State-Province to State or Province
    Image 3b

  • City to City
    Image 3c

F. Configure the Sales table
This task configure the Sales table with updated descriptions, formatting, and summarization.

STEPS

  1. In the Sales table, select the Cost column. Image 1
  2. In the Properties pane, in the Description box, enter: Based on standard cost Image 2
  3. Select the Quantity column. Image 3
  4. In the Properties pane, from inside the Formatting section, set the Thousands Separator property to Yes. Image 4
  5. Select the Unit Price column. Image 5
  6. In the Properties pane, from inside the Formatting section, set the Decimal Places property to 2. Image 6
  7. In the Advanced group (you may need to scroll down to locate it), in the Summarize By dropdown list, select Average. Image 7 By default, numeric columns will summarize by summing values together. This default behavior isn't suitable for a column like Unit Price, which represents a rate. Setting the default summarization to average will produce a meaningful result.

G. Bulk update properties
This task updates multiple columns using single bulk updates. This approach is used to hide columns, and format column values.

STEPS

  1. In the Data pane (or model diagram), select the ProductKey column in the Product table Image 1.
  2. While pressing the Ctrl key, select the following 13 columns SalesTerritoryKey (Region Table), ResellerKey (Reseller), EmployeeKey, ProductKey, ResellerKey, SalesOrderNumber and SalesTerritoryKey (Sales Table), EmployeeID, EmployeeKey, UPN (Salesperson Table), EmployeeKey, SalesTerritoryKey (SalespersonRegion), and EmployeeID (Targets). Image 2
  3. In the Properties pane, set the Is Hidden property to Yes.
    Image 3
    The columns were hidden because they're either used by relationships or will be used in row-level security configuration or calculation logic.

  4. Multi-select the following three columns: Standard Cost (Product Table), Cost and Sales (Sales Table).

  5. In the Properties pane, from inside the Formatting section, set the Decimal Places property to 0 (zero).
    Image 5

H. Explore the model interface

STEPS

This task explains how to switch to Report view, review the data model interface, and configure the auto date/time setting.

  1. Switch to Report view. Image 1
  2. In the Data pane, notice the following:
  1. In the Options window, on the Current File section, navigate to Data Load > Time Intelligence, and uncheck Auto Date/Time. Image 5
  2. In the Data pane, notice that the date hierarchies are no longer available. Image 6

I. Create quick measures

STEPS

This task creates two quick measures to calculate profit and profit margin. A quick measure creates the calculation formula for you. They're easy and fast to create for simple and common calculations.

  1. In the Data pane, right-click the Sales table, and then select New Quick Measure. Image 1
  2. In the Quick Measure pane, in the Select a Calculation dropdown list. Image 2a From inside the Mathematical Operations group, select Subtraction. Image 2b
  3. From the Data pane, drag the Sales (Sales field) into the Base Value well. Image 3
  4. Drag the Sales (Cost field) into the Value to Subtract box. Image 4
  5. Select Add. Image 5
  6. In the Data pane, inside the Sales table, notice that new measure. Measures are indicated by the calculator icon. Image 6
  7. To rename the measure, right-click it, select Rename, then rename as Profit. Image 7 Tip: To rename a field, you can also double-click it, or select it and press F2.
  8. In the Sales table, add a second quick measure, based on the following requirements: Image 8
  9. Use the Division mathematical operation. Image 8a
  10. Set the Numerator to the Sales (Profit field). Image 8b
  11. Set the Denominator to Sales (Sales field). Image 8c
  12. Rename the measure as Profit Margin. Image 8d
  13. Ensure the Profit Margin measure is selected, and then on the Measure Tools contextual ribbon, set the format to Percentage, with two decimal places. Image 9
  14. To test the two measures, first select the existing table visual on the page. Image 10
  15. In the Data pane, check the Profit and Profit Margin measures to add them to the table. Image 11
  16. Select and drag the right guide to widen the table visual. Image 12
  17. Verify that the measures produce reasonable results that are correctly formatted. Image 13

J. Create a many-to-many relationship

STEPS

This task creates a many-to-many relationship between the Salesperson table and the Sales table.

  1. In Report view, select a blank area of the report page. Image 1
  2. To create a new table visual, in the Data pane, check the following two fields: Salesperson (Salesperson) and Sales (Sales). Image 2
  3. Notice that Michael Blythe has generated almost 9 million dollars of sales. Image 3
  4. Switch to Model view, then drag the SalespersonRegion table to position it between the Region and Salesperson tables.
  5. Use the drag-and-drop technique to create the following two model relationships:
  6. Salesperson | EmployeeKey to SalespersonRegion | EmployeeKey
  7. Region | SalesTerritoryKey to SalespersonRegion | SalesTerritoryKey The SalespersonRegion table can be considered to be a bridging table.
  8. Switch to Report view, and then notice that the visual hasn't updated the sales result for Michael Blythe hasn't changed. Image 6
  9. Switch back to Model view, and then follow the relationship filter directions (arrowhead) from the Salesperson table. Note that the Salesperson table filters the Sales table. It also filters the SalespersonRegion table, but it doesn't continue by propagating filters to the Region table (the arrowhead is pointing the wrong direction). Image 7
  10. To edit the relationship between the Region and SalespersonRegion tables, double-click the relationship. Image 8
  11. In the Edit Relationship window, in the Cross Filter Direction dropdown list, select Both. Image 9 10.Check the Apply Security Filter in Both Directions checkbox. Image 10 11.Select Save. Image 11 12.Notice that the relationship has a double arrowhead now. Image 12 13.Switch to Report view, and then notice that the sales values have still not changed. Image 13 14.Switch to Model view.
  12. To force filter propagation via the bridging table, edit (double-click) the relationship between the Salesperson and Sales tables. Image 15 16.In the Edit Relationship window, uncheck the Make This Relationship Active checkbox. 17.Select Save. Image 17 Filter propagation will now follow the only active path. 18.In the model diagram, notice that the inactive relationship is represented by a dotted line. Image 18 19.Switch to Report view, and then notice that the sales for Michael Blythe are now nearly 22 million dollars. Image 19 20.Notice also, that the sales for each salesperson—if added—would exceed the table total. 21.Switch to Model view, and then in the model diagram, select the Salesperson table. Image 21 22.In the Properties pane, in the Name box, replace the text with Salesperson (Performance). Image 22 The renamed table now reflects its purpose: it's used to report and analyze the performance of salespeople based on the sales of their assigned sales regions.

K. Relate the Targets table

STEPS

This task creates a relationship to the Targets table.

  1. Create a relationship from the Salesperson (Performance) (EmployeeID column) and the Targets (EmployeeID column). Image 1
  2. In Report view, add the Targets (Target field) to the table visual. Image 2
  3. Resize the table visual so all columns are visible. Image 3