Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello everyone,
I am trying to replicate a table from SQL to Power BI by creating some measures & columns, but when I multiplied them, the resulting column would always produce the wrong values. I really need some help please.
My master table looks like this (each row is a unique record):
In SQL, I used some query to slice and dice the master table, and it produced the correct results as below:
The 4th column "MULTI_SEAT_PER_FLIGHT_BY_MONTH" is the same (=14) for each month but it's 12 for Apirl only.
However, I just couldn't get the last column right in Power BI, no matter how I manipulate it. The current wrong table looks like this:
The columns and measures are created as follows:
- MULTI_SEAT_COUNT (measure):
MULTI_SEAT_COUNT = COUNTROWS('MULTI SEAT MASTER VIEW')
- FLIGHT_COUNT_MEASURE (tried both measure and column) - each count is a unique concatenation of the following 5 columns:
FLIGHT_COUNT = COUNTROWS(SUMMARIZE('master_table', 'master_table'[OPERATING_CODE], 'master_table'[FLIGHT_NUMBER], 'master_table'[ARRIVAL], 'master_table'[DEPARTURE], 'master_table'[FLIGHT_DEPARTURE_DATE]))
- OPERATED_MULTI_SEAT_PER_FLIGHT (column):
OPERATED_MULTI_SEAT_PER_FLIGHT = SWITCH (
TRUE,
'master_table'[FLIGHT_DEP_YEAR_MON] = "04/2024", 12,
14 )
- OPERATED_MULTI_SEAT (column):
OPERATED_MULTI_SEAT = 'master_table'[FLIGHT_COUNT_MEASURE] * 'master_table'[OPERATED_MULTI_SEAT_PER_FLIGHT]
Any idea what is the issue please? Appreciate your help in advance. Thank you!
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
7 | |
6 |