Business Intelligence Blogs

View blogs by industry experts on topics such as SSAS, SSIS, SSRS, Power BI, Performance Tuning, Azure, Big Data and much more! You can also sign up to post your own business intelligence blog.

«February 2016»

Power BI Publish to Web for Anonymous Access is Here

Earlier this week on Wednesday the Microsoft Power BI made an incredibly exciting announcement and released Power BI “publish to web” as a preview feature. This is HUUUUGE news! This was probably the top requested feature and its finally here thanks to the hard work and dedication of the Microsoft Power BI team!

Read Getting Started with R Visuals in Power BI

Power BI “publish to web” allows you to easily expose a Power BI report to the world through an iframe that can be embedded wherever you like.

To publish your Power BI report to the web, log into your Power BI site.

Find the report that you want to share and click File in the top left.
Power BI publish to web

You’ll see a message pop up box similar to below. Click the yellow button to create the embed code.
Power BI publish to web preview

This is where you’ll see a very important warning!
WARNING: Reports that you expose through the “publish to web” feature will be visible to everyone on the internet! This means NO AUTHENTICATION is required to view the report that is embedded in your application.
warning 2

Once you do that, you’ll receive an embed code that you can then use to expose your Power BI report within your blog as seen below!

As you can see the report maintains all the interactivity features of Power BI. And as your Power BI report updates and changes, those changes will be reflected in your embedded Power BI reports!

Pretty awesome!

Additional Resources

Read the Power BI “publish to web” announcement here.

Read the Power BI “publish to web” documentation here.


Let me know what you think of this feature or if you have any questions. Leave a comment down below.

Read more

SSRS Switch Function Examples

  • 25 January 2011
  • Author: ChrisAlbrektson
  • Number of views: 98072

Hello Bidn,

Below I’m going to show you a few quick examples of how to use the Switch function within SSRS expressions.


In the first example we will change the font color based on the quantity of units sold.

Green will be a quantity of 20,000 +, Black will be a quantity of 10,000 +, and everything less than 10,000 will be displayed as Red.

To do something like this go to the properties of the selected cell in the table and then go to Font/Color. On the drop down list for color, choose expression and enter the following expression.

=Switch(Fields!TotalQuantity.Value <= 10000, "Red" ,

        Fields!TotalQuantity.Value >= 20000, "Green",

        Fields!TotalQuantity.Value >  10000, "Black")

After the above expression has been entered run the report and you should see something like the image below.



For the next example let’s suppose you have three columns in your report LastMonth, ThisMonth, and NextMonth. That’s pretty easy but what if you had a business rule that said if it’s less than the 3rd day of the month then show last month. You can handle this situation as well by using the Switch expression. For my example today I will be using day 26 so you can see how it works.

First create an expression as we did before and use the following code.

=Switch(Day(Now()) <  26,format(dateadd("m",-1,dateadd("d",1-datepart("d",today()),today())),"MMM yyyy"),

        Day(Now()) >= 26,format(dateadd("m", 0,dateadd("d",1-datepart("d",today()),today())),"MMM yyyy"))

From the image below in yellow you can see that the day was set to day 27 or higher because it’s showing the correct Month, January 2011. If you look at the blue area below you can see that the months are now 1 month behind beucase I set the day to 26 and the date of writing this blog is January 25th, 2011.


As with most things in SSRS you can do something in more than 1 way but today I wanted to introduce you to the Switch Function.


Categories: Blogs
Rate this article:
No rating


Other posts by ChrisAlbrektson

Please login or register to post comments.