Political Violence Tracking App

Political Violence Tracking App
This report app uses the Armed Conflict Location & Event Data Project (ACLED) real-time data to track political violence in Ethiopia. The report uses both simple explanatory and advanced geo-proximity data analytic methods.

How to Create Dynamic Parameter in PowerBI?

PowerBI is a very powerful tool for business intelligence. It has a lot of functionalities. However, the what if parameter functionality currently only accepts numeric data types. And this causes limitation for dynamic analytics - self-service analytics based on user selection of a given measure or dimension or aggregation/calculation level. One way to overcome this limitation is to leverage the what if parameter, calculated columns, and measures.

Step 1: First create a parameter, I called is Selected_Values:

                                Selected_Values = GENERATESERIES(1, 5, 1)  

              PowerBI will create a table and name it after your parameter name.

 Or, You can create the what if parameter as follows - go to modeling ribbon, click on what if parameter -  you will get a parameter window. 

Step 2: Based on the value of the parameter, let's create a calculated field that will contain the name of the measures that you would like your report users dynamically to change in in the report and see the result without creating any additional visualizations.

  I called the calculated column as “TestField123”. here is the Dax code I used: 

By the way, I am using the Cryptocurrency dataset from Data.World. I have 5 measures which I would like to change them in a report dynamically without creating additional viz.

Step 3: Here is how the magic works. We have a what if parameter that is a whole number data type from 1 to 5. We have a calculated column that tells us the measure name based on what is selected in the parameter.  

Now, let’s leverage the parameter and create a calculated field. I  have a fact table – called factCryptocurrency. 

The logic is simple. When a user selects 1, the measure will point to Price, when selects 2,  it will point to Fees etc…

I created a simple line chart- using a date dimension and the measure we calculated based on what is selected in the what if parameter:

Note that I used “Test123 Measure” in Values places for the line chart. Note also Transaction Count is selected and the parameter values (List mode) is selected, which is 3. Perfectly as I assigned it. Let’s select Price see what will be selected in the parameter:

When I select Price, the parameter is flittered and the chart is also updated accordingly.

Report users don’t know what 1 or 2 or 3 stands for in this context. So, let's remove the parameter from the report canvas. And the parameter and the calculated field is literally representing the same information for the different purposes


A)   I used the what if parameter – whole number data type – and assigned it 1 to 5.   
B)   I assigned each of my five measures to the parameter – in my calculated fields
C)   I used the parameter to create a calculated measure
D)   In short, the role of the what if parameter is to be a bridge since PowerBI doesn’t support non-numeric data types in what if parameters. 

This measure can be used in any calculation, and based on what is selected in the parameter, the calculation will be updated accordingly.

Let me know if you have any questions/suggestions. 

How is Ethiopia performing in the World Bank's yearly Doing Business Survey?

How is Ethiopia performing in the World Bank's yearly Doing Business Survey?
Ethiopia's performance is getting worse as it reflects in the Doing Business Survey ranking. The country becomes business unfriendly, particularly in the post Melse era.

NFL 2017/2018 Rating and Viewership Compared to Last Year

NFL 2017/2018 Rating and Viewership Compared to Last Year
This dashboard shows the first 7 weeks of NFL 2017/2018 season games rating and viewership as compared to the same time last year.

Political Violence in Ethiopia since 2000

Political Violence in Ethiopia since 2000
While we are witnessing the unfolding political crisis in Ethiopia, here is the dashboard that shows political violence since 2000. I accessed the data from ACLED's (Armed Conflict Location & Event Data Project) data portal and it is as of 10/14/2017.

Which Ethiopian Music Videos are the most viewed/liked/disliked/commented on YouTube?

Which Ethiopian Music Videos are the most viewed/liked/disliked/commented on YouTube?
This dashboard shows which Ethiopian music videos are the most viewed, liked, disliked, commented on Youtube. I got the data used in this dashboard from YouTube's AIP using Python. The data is a snapshot and I possibly could update the data based on some time interval.