Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi
I am trying to make a table that looks like this in Power BI.
One of the problems I face is that I can't works with calendardata, as we have the quarters and a fifth period in the summer. I just can't seem to figure out how I should be taking this on.
Here is a link for the datafile, if it is to any help. Table data
I would be very grateful for any help!
Thanks in advance!
Solved! Go to Solution.
Hi @kjartank,
If I understand you correctly, you should be able to use the formulas below to get your expected result.
1. Add a new calculate column "QuarterNO" to your table.
QuarterNO =
VALUE ( LEFT ( Tabel2[Quarter], 4 ) ) * 4
+ VALUE ( MID ( Tabel2[Quarter], 6, 1 ) )
2. Create different measures to calculate "Score", "+\-", and "Satisfied%", then show them on the Table visual with the "Booking-Where" column.
Score =
VAR latestQuarter =
CALCULATE ( MAX ( Tabel2[QuarterNO] ), ALL ( Tabel2 ) )
RETURN
CALCULATE (
AVERAGE ( Tabel2[Booking - Satisfaction] ),
Tabel2[QuarterNO] = latestQuarter
)
+/- =
VAR latestQuarter =
CALCULATE ( MAX ( Tabel2[QuarterNO] ), ALL ( Tabel2 ) )
RETURN
CALCULATE (
AVERAGE ( Tabel2[Booking - Satisfaction] ),
Tabel2[QuarterNO]
>= latestQuarter - 2
&& Tabel2[QuarterNO]
<= latestQuarter - 1
)
- [Score]
Satisfied% =
VAR latestQuarter =
CALCULATE ( MAX ( Tabel2[QuarterNO] ), ALL ( Tabel2 ) )
RETURN
DIVIDE (
CALCULATE (
COUNTROWS ( Tabel2 ),
FILTER (
Tabel2,
Tabel2[QuarterNO] = latestQuarter
&& Tabel2[Booking Satisfied] = "Satisfied"
)
),
CALCULATE (
COUNTROWS ( Tabel2 ),
FILTER ( Tabel2, Tabel2[QuarterNO] = latestQuarter )
)
)
Here is the modified pbix file for your reference. ![]()
Regards
Hi @kjartank,
If I understand you correctly, you should be able to use the formulas below to get your expected result.
1. Add a new calculate column "QuarterNO" to your table.
QuarterNO =
VALUE ( LEFT ( Tabel2[Quarter], 4 ) ) * 4
+ VALUE ( MID ( Tabel2[Quarter], 6, 1 ) )
2. Create different measures to calculate "Score", "+\-", and "Satisfied%", then show them on the Table visual with the "Booking-Where" column.
Score =
VAR latestQuarter =
CALCULATE ( MAX ( Tabel2[QuarterNO] ), ALL ( Tabel2 ) )
RETURN
CALCULATE (
AVERAGE ( Tabel2[Booking - Satisfaction] ),
Tabel2[QuarterNO] = latestQuarter
)
+/- =
VAR latestQuarter =
CALCULATE ( MAX ( Tabel2[QuarterNO] ), ALL ( Tabel2 ) )
RETURN
CALCULATE (
AVERAGE ( Tabel2[Booking - Satisfaction] ),
Tabel2[QuarterNO]
>= latestQuarter - 2
&& Tabel2[QuarterNO]
<= latestQuarter - 1
)
- [Score]
Satisfied% =
VAR latestQuarter =
CALCULATE ( MAX ( Tabel2[QuarterNO] ), ALL ( Tabel2 ) )
RETURN
DIVIDE (
CALCULATE (
COUNTROWS ( Tabel2 ),
FILTER (
Tabel2,
Tabel2[QuarterNO] = latestQuarter
&& Tabel2[Booking Satisfied] = "Satisfied"
)
),
CALCULATE (
COUNTROWS ( Tabel2 ),
FILTER ( Tabel2, Tabel2[QuarterNO] = latestQuarter )
)
)
Here is the modified pbix file for your reference. ![]()
Regards
I need the list of formulas for Power BI.
Like they do in excel.
Where Can I get it?
You are a genius! Thanks a lot!
A last question. How would I tell PBI to exclude the blanks?
If it is impossible ti make such a table, what would be a good way to show this data?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 51 | |
| 37 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 64 | |
| 39 | |
| 33 | |
| 23 |