Monday, July 19, 2021

Power BI - How to create 5 STAR Rating in Power BI

 

1)   What is 5 STAR Rating

Customer review(s) help us in building our brand and also helps customer to choose which service/brand they should use. Five STAR Rating (★★★★★) is very simple & easy way to understand quality of service or brand value. It plays a very vital role in business.

 

2)   REPT & UNICHAR DAX function(s) in Power BI

We are going to use UNICHAR & REPT functions to implement Five STAR Rating:

a.      UNICHAR

                                                  i.      UNICHAR function returns the Unicode character referenced by the numeric value.

                                                ii.      Syntax – UNICHAR(number)

                                              iii.      The character represented by the Unicode number 9733 is ( character).

                                               iv.      The character represented by the Unicode number 9734 is (character).

                                                 v.      UNICHAR(9733) returns

                                               vi.      UNICHAR(9734) returns

b.      REPT

                                                  i.      REPT function repeats text a given number of times

                                                 ii.      Syntax - REPT(<text>, <num_times>)

                                               iii.       REPT("A",3)  returns AAA


 3)   How it works in Power BI

a.      Open the Power BI Designer

b.      Create a table e.g StarRating with values 1-5 in column named Rate.

 

                                           
 

c.       Create a calculated Measure using UNICHAR & REPT to generate the 5 STAR Rating (★★★★★)

d.      Expression:
REPT(UNICHAR(9733), AVERAGE('StarRating'[Rank]))  &&

REPT(UNICHAR(9734), 5 - AVERAGE('StarRating'[Rank]))

 

                   

 

4)   Understanding of DAX Expression(s) & 5 STAR Rating

 


5)   Conclusion: We are able to generate 5 START Rating in Power BI

Thursday, July 15, 2021

Power BI - How to refresh single table from data model

Issue: When we click on Refresh button to refresh the table(s) in Power BI Designer, by default, it will start refreshing all the tables in the data model. Sometimes, we may need to refresh only 1 or 2 tables instead of complete Data Model.  Refreshing complete data model is a time consuming process depends on volume of data & unnecessary utilization of CPU, I/O & memory if complete data model refresh is not required. To avoid such refresh issue, Power BI provides a way of refreshing table individually.



Steps to refresh table individually:

      1) Open the Power BI Designer

      2) Right click on the table which need to refresh. Click on Refresh.

                               


          3) It will start refreshing the table