Forum Discussion
How to dynamically generate multiple line values in a stacked column and line chart without creating
Olá a todos,
Estou enfrentando um desafio com um gráfico de colunas e linhas empilhadas no Power BI.
A cada mês, preciso adicionar um novo valor de linha ao gráfico (além das colunas empilhadas), mas atualmente tenho que criar uma nova medida manualmente para cada linha toda vez que um novo mês chega.
Estou procurando uma maneira de gerar dinamicamente esses valores de linha sem precisar atualizar ou criar manualmente uma nova medida a cada mês. Idealmente, eu gostaria de usar uma dimensão ou algum outro método que permita que o gráfico reflita automaticamente várias séries de linhas com base nos dados.
Existe uma prática recomendada ou solução alternativa para esse cenário?
Imagem 1: Medidas manuais criadas mensalmente
Cada linha no gráfico é baseada em uma medida criada manualmente para cada mês. Isso se torna demorado e difícil de manter ao longo do tempo.
Figura 2: Tentativa de criar linhas dinamicamente
Tentando gerar valores de linha dinamicamente usando uma única medida ou dimensão, mas o visual não separa as linhas corretamente.
Desde já, obrigado!
Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.
11 Replies
- lbendlin
Super User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523- MyllenaFrequent Visitor
Sample data for better understanding:
(Each "ARQUIVO FONTE" represents a different dataset with "REALIZADO" and "PO" values for each date.)ARQUIVO FONTE REALIZADO PO DATA ATRIBUTO PO-01-25 10 20 01/01/2025 CO2 PO-01-25 10 20 01/02/2025 CO2 PO-01-25 10 20 01/03/2025 CO2 PO-01-25 10 20 01/04/2025 CO2 PO-01-25 10 20 01/05/2025 CO2 PO-01-25 10 20 01/06/2025 CO2 PO-01-25 10 20 01/07/2025 CO2 PO-01-25 10 20 01/08/2025 CO2 PO-01-25 10 20 01/09/2025 CO2 PO-01-25 10 20 01/10/2025 CO2 PO-02-25 10 21 01/01/2025 CO2 PO-02-25 10 21 01/02/2025 CO2 PO-02-25 10 21 01/03/2025 CO2 PO-02-25 10 21 01/04/2025 CO2 PO-02-25 10 21 01/05/2025 CO2 PO-02-25 10 21 01/06/2025 CO2 PO-02-25 10 21 01/07/2025 CO2 PO-02-25 10 21 01/08/2025 CO2 PO-02-25 10 21 01/09/2025 CO2 PO-02-25 10 21 01/10/2025 CO2 What I want:
The "REALIZADO" values to appear as stacked columns.
The "PO" values to appear as separate line series, one for each "ARQUIVO FONTE", without needing to manually create a new measure for each file every time.
I'm trying to achieve this dynamically, but so far I haven't found a way to make the line values split automatically.
- lbendlin
Super User
Why a stacked column for REALIZADO ? These are only single values.
You could use Small Multiples to separate out the ARQUIVO FONTE.
- MyllenaFrequent Visitor
I still haven't been able to solve it, with no solution so far.
- v-venuppu
Community Support
Hi Myllena ,
Thank you for reaching out to Microsoft Fabric Community.
Thank you lbendlin for the prompt response.
Can you please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided as suggested by Ibendlin so that it will be helpful for us to reporoduce the solution.Regards,
Rama U.
- v-venuppu
Community Support
Hi Myllena ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
- v-venuppu
Community Support
Hi Myllena ,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please accept it as a solution and give it a 'Kudos' so other community members with similar problems can find a solution faster.
Thank you.