Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi all,
I have an issue with my data source and I need to be able to report on data in the charts and tables - basically front end.
I need to go from the current state:
Current State
Date Column1 Column2
31/12/2018 2 0
12/12/2018 3 1
to :
Desired State
Date Column1 Column2
31/12/2018 5 1
12/12/2018 3 1
How to do it best - front end vs back end
Many thanks,
I would really appreciate if anyone could help me to solve this.
Many thanks!
@Anonymous wrote:Hi all,
I have an issue with my data source and I need to be able to report on data in the charts and tables - basically front end.
I need to go from the current state:
Current State
Date Column1 Column2
31/12/2018 2 0
12/12/2018 3 1
to :
Desired State
Date Column1 Column2
31/12/2018 5 1
12/12/2018 3 1
How to do it best - front end vs back end
Many thanks,
Hi @Anonymous ,
To create two calculated columns as below.
Desired 1 = CALCULATE(SUM('current'[column1]),FILTER('current','current'[date]<=EARLIER('current'[date])))
Desired 2 = CALCULATE(SUM('current'[column2]),FILTER('current','current'[date]<=EARLIER('current'[date])))
Regards,
Frank
thank you for your input. FYI my actual table has more records than 2 as per my example, I am risking to state the obvious. 🙂
@Anonymous not entirely sure what you asking but i think you could probably do a switch statement
https://docs.microsoft.com/en-us/dax/switch-function-dax
create a calculated column
desired state column1 =
SWITCH ( [column1],
2, 5,
3, 3 )
Proud to be a Super User!
Hi @Anonymous ,
Could you please share your sample data or Pbix to me via One Drive, kindly upload the files and share the link here.
BTW, maybe your can try to create a calculated table of an Aggregation one by using SUMMARIZECOLUMNS function as below.
Table = SUMMARIZECOLUMNS('current'[Date],"co1",SUM(current[column1]),"co2",SUM(current[column2]))
Hi @v-frfei-msft ,
Many thanks for your suggestions.
I'll try to create a calculated table if that does not work - I'll share file with you.
Many thanks!
I tried as you suggested but it does not work I get error.
How to add the file so you could have a look , sorry I have never done that before.
Thanks
Hi @v-frfei-msft ,
Many thanks for your suggestions.
I'll try to create a calculated table if that does not work - I'll share file with you.
Many thanks!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |