cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PriyankaYadav
Regular Visitor

How to show parking slot availability using SVG image

Hi,

Need urgent help and suggestions please. This is related to using SVG and creating measure for desired result on SVG.

 

Problem Statement: On my Parking Dashboard, I want to depict a Parking Lots' slot availability (by color, green and red) using its SVG image. I have understood that I can write VAR measure to fill the slots colors. Color would depend on values for each parking slot that I am getting from a certain table and column.

Floor1.jpgSVG image

 

Vail snippet.PNG

 

The first pic is for the svg to be filled. The second image is the result. The colors would be dynamic and would keep on changing as per slot availability real time.

 

I want to understad if this is possible to achieve via approach of DAX formula (VAR) on svg images? And if there is a simpler way to achive end result?

 

My inspirations for the solution were below links:

https://www.youtube.com/watch?v=z7eyZM2b4Z8

https://www.kasperonbi.com/showing-kpis-in-a-table-or-matrix-with-power-bi/

 

Thanks in Advance,

Priyanka

3 REPLIES 3
GauravSingh Resolver II
Resolver II

Re: How to show parking slot availability using SVG image

Hi @PriyankaYadav ,

 

You could easly achieve your desire result by using CARD visual.

All you have to do is to use Conditional formatting on Background and Data lable of the CARD visual.

For example,

                     you could set a rule to show Green color for background and data lable if the value is 1,

                                                                    Red color for background and data lable if the value is 0.

                                                                    

NOTE : YOU SHOULD SET UP SIMILAR CONDITIONAL FORMATING FOR BOTH BACKGROUND AND DATA LABLE.

 

I have applied similar condition formatting, please see the attched picture below.

 

background conditional formating.PNG

 

 

Here the time consuming part is making card visuals for every parking slots.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.

 

Regards,

Gaurav Raj Singh

LinkedIN : https://www.linkedin.com/in/gauravrajsingh/

Highlighted
PriyankaYadav
Regular Visitor

Re: How to show parking slot availability using SVG image

Thanks Gaurav. I have further questions, hope you dont mind. 

 

I understood your approach, but facing the following 2 issues:

1) How do i make reference to particular slot data?

Table Description: Level ID depicts Floor Level, Slot ID is slot no on that floor, Slot Data is 0 for unoccupied or 1 for unoccupied. Slot Type is type of Parking slot, C for compact and EV for EV charging  

For each card, I have to make reference to corresponding Slot Data. How do i achieve that? 

LevelSlotDataType.PNG

 

My prob is how do i make reference to that slot data corresponding to that Slot under conditional formatting (by creating a measure, which formula to use to make that reference?) 

conditional formatting 1.PNG

Problem 2) Other than color, I also need to depict other attributes of slot such as Letter or image 'C' for Compact vehicle and EV charing image (please refer to desired result diagram posted in initial question) for each slot with such facilities as per data coming from source table above. How do i create this conditional formatting for images, or texts?

 

Regards, 

Priyanka 

GauravSingh Resolver II
Resolver II

Re: How to show parking slot availability using SVG image

Hi @PriyankaYadav ,

 

Please use the following approach 

 

1) How do i make reference to particular slot data?

You can easily make unique keys column for each slot by merging level ID and Slot ID together.

For example, Unique_SlotID = 11, for level ID =1 and Slot ID = 1.

 

Use these unique keys to filter slots.

 

Now in condition formating,

Select :    FORMAT BY RULES

And

Number 1 is green color 

Number 2 is Red color.

 

 

Problem 2) Other than color, I also need to depict other attributes of slot such as Letter or image 'C' for Compact vehicle and EV charing image (please refer to desired result diagram posted in initial question) for each slot with such facilities as per data coming from source table above. How do i create this conditional formatting for images, or texts?

 

On top of each card visual you can show other card visual as well with similar color formatting i have mention above to show type of slot.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.

 

Regards,

Gaurav Raj Singh

LinkedIN : https://www.linkedin.com/in/gauravrajsingh/

 

 

 

 

 

 

 

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.