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.
Hi, How Are You?. Again, I appeal to you for great help.
I created two dimensions ("FactorOccupac" and "FactorOccupac1") that they perform two calculations of two different dates. All data is taken from a single table and the filters on the page come from that table. What happens that, in two graphics cards the results are presented correctly, but when I want to subtract those two dimensions (in a third dimension, "DifFO1FO2") to obtain the difference, the result of "FactorOcupac" is blank, although in its graphic card continues to appear correctly (therefore, the result of the difference is wrong).
The idea is to have the flexibility to filter any date to present the data of the chosen.
I read that you can not subtract the results of the graphic cards in a different way. Is that so?.
What I can do?.
Thank you very Much!!
Solved! Go to Solution.
Hi @walkra
Tested with your pbix shared in previous post as below:
Create two tables
one table named "date1"
date1 = ADDCOLUMNS(CALENDAR(MIN('TMSEGX (2)'[FechaDocumento]),MAX('TMSEGX (2)'[FechaDocumento])),"year/month",FORMAT([Date],"mmmm yyyy"))
another table named "date2"
date2 = ADDCOLUMNS(CALENDAR(MIN('TMSEGX (2)'[FechaDocumento]),MAX('TMSEGX (2)'[FechaDocumento])),"year/month",FORMAT([Date],"mmmm yyyy"))
Note: don't create any relationship for these two tables.
Then add "year/month" columns from "date1" and "date2" to two slicers.
Create measures in "TMSEGX (2)" table
Measure = CALCULATE(SUM('TMSEGX (2)'[Columna]),FILTER(ALLSELECTED('TMSEGX (2)'),'TMSEGX (2)'[Column]=SELECTEDVALUE(date1[year/month])))/[Valor CantidadEmpleados] Measure 2 = CALCULATE(SUM('TMSEGX (2)'[Columna]),FILTER(ALLSELECTED('TMSEGX (2)'),'TMSEGX (2)'[Column]=SELECTEDVALUE(date2[year/month])))/[Valor CantidadEmpleados] Measure 3 = [Measure]/[Measure 2] (if you'd like to subtract them, use "-" instead)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @walkra
Tested with your pbix shared in previous post as below:
Create two tables
one table named "date1"
date1 = ADDCOLUMNS(CALENDAR(MIN('TMSEGX (2)'[FechaDocumento]),MAX('TMSEGX (2)'[FechaDocumento])),"year/month",FORMAT([Date],"mmmm yyyy"))
another table named "date2"
date2 = ADDCOLUMNS(CALENDAR(MIN('TMSEGX (2)'[FechaDocumento]),MAX('TMSEGX (2)'[FechaDocumento])),"year/month",FORMAT([Date],"mmmm yyyy"))
Note: don't create any relationship for these two tables.
Then add "year/month" columns from "date1" and "date2" to two slicers.
Create measures in "TMSEGX (2)" table
Measure = CALCULATE(SUM('TMSEGX (2)'[Columna]),FILTER(ALLSELECTED('TMSEGX (2)'),'TMSEGX (2)'[Column]=SELECTEDVALUE(date1[year/month])))/[Valor CantidadEmpleados] Measure 2 = CALCULATE(SUM('TMSEGX (2)'[Columna]),FILTER(ALLSELECTED('TMSEGX (2)'),'TMSEGX (2)'[Column]=SELECTEDVALUE(date2[year/month])))/[Valor CantidadEmpleados] Measure 3 = [Measure]/[Measure 2] (if you'd like to subtract them, use "-" instead)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Beautiful!! Divine!!. You do not know how many hours I spent trying to solve this problem. In addition, you teach me to create tables from code. One more question: why should we create the "Column" field based on the same information as the "DateDocument" field (only to know the logic).
An impeccable and very didactic explanation!
Thank You, Very Much!!!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |