Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
michellmadeira
Frequent Visitor

Using filters to change value/column in view

Guys, 

 

I want to work with a report that contains 2 values: quantity sold and income.

But I wish I could show them on the same line graph, and individually (by filter control) also in the same line graph, like this:

 

GRAFICO.png

 

The first one show the hybrid version - qty. and income.

The second ones are possible visions, that could be controled by a hypotetical filter.

 

Is this possible? 

Do you have any better suggestion to mix indicators on the same report?

 

I'd like to combine related indicators on the same reports because I work with blocks of information that also have some relation (below).

Combining indicators on the same graph, and filtering by demand, would better distribute information on the report, helping me visualize evolution of the means along the period:

 

GRAFICO.png

Thanks,

Michell Madeira

4 REPLIES 4
michellmadeira
Frequent Visitor

I have tested some possibilities during the last hours, and found a possibily solution, but I am still believe there is a better way to do that, and would aprecciate some external help.

 

We may take the following table as the parameter:

 

DateDetailSalesQty
01/janGames18003
02/janGames15006
03/janGames30008
04/janGames25007
05/janGames25005
01/janComputers300015
02/janComputers18009
03/janComputers440022
04/janComputers360018
05/janComputers4000

20

 

There we have sales and quantity, by "date" and "detail" (games/computers).

 

As a graph, I wish they could work like this:

 

REPORT1.png

 

So, the only solution I've found was to reconstruct the table like this:

 

DateFiltroKPIValues
01/janGamesSales1800
02/janGamesSales1500
03/janGamesSales3000
04/janGamesSales2500
05/janGamesSales2500
01/janComputersSales3000
02/janComputersSales1800
03/janComputersSales4400
04/janComputersSales3600
05/janComputersSales4000
01/janGamesQty3
02/janGamesQty6
03/janGamesQty8
04/janGamesQty7
05/janGamesQty5
01/janComputersQty15
02/janComputersQty9
03/janComputersQty22
04/janComputersQty18
05/janComputersQty20

 

The first problem is formatting (I would work with at least 3 ranges of informations - %, tens and thousands).

The second problem is to streamline this summarization, because I work with lots of informations.

 

Any idea on working with that?

 

Hi Michell,

 

I have tested you solutoin which wokrs fine. And actually you do not need to reconstruct the table, you can use a query like below.
select a.Date as [Date],a.Detail as [Detail],'Sales' as [KPI],a.Sales as [Value]
from
[dbo].[Test1] as a
union all
select a.Date as [Date],a.Detail as [Detail],'Qty' as [KPI],a.Qty as [Value]
from
[dbo].[Test1] as a

Or you can create view use that query, and use the view as the data source.

Capture.PNG

 

Regards,
Charlie Liao

Charlie

 

I've did my best to transcript it to M (Power Query) and work it from the Advanced Editor on Power BI, but I couldn't.

I'm not so experienced in this engine, and in my world, it would be best to be done in that step.

 

Could you please help me just with the syntax?

I would invest my time to construct the function.

 

Thanks, 

Michell

I will start testing it soon, and will return to you, my friend.

 

Thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.