This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
Hello.
I have a table like this
| Código | F.INI_PARTIDA | F.FIN_PARTIDA |
| SIN FECHA | 10 | |
| SIN FECHA | 12 | |
| 10 | 2019 | |
| 1 | 12 | |
| 1 | 2019 | |
| 9 | 2019 | |
| 10 | 2019 | |
| SIN FECHA | SIN FECHA | |
| SIN FECHA | 6 | |
| 416332 | 1 | 1 |
| SIN FECHA | SIN FECHA | |
| 413111 | 1 | 1 |
| 1 | 12 | |
| SIN FECHA | SIN FECHA | |
| 418325 | 1 | 6 |
| 418074 | 1 | 6 |
| 415902 | 1 | 6 |
| 1 | 2019 | |
| SIN FECHA | SIN FECHA | |
| 2 | 10 | |
| SIN FECHA | SIN FECHA | |
| SIN FECHA | SIN FECHA | |
| 1 | 2019 | |
| SIN FECHA | SIN FECHA | |
| SIN FECHA | SIN FECHA | |
| 419426 | 1 | 12 |
I would like to build two measures. The first one, a measrure that would obtain the number of Codigo_Clarity by F.INI_PARTIDA and the other one by F.Fin_Partida and put them in the same graph such in the attached image
With this dataset for the Month 1 the first Measures would be 11 and the second Measure would be 2.
For the Month 2 the first Measure would be 1 and second one would be 0.
Thank you in advance.
Solved! Go to Solution.
With a isolated table for months, yo can do something like this:
VALOR_A_BUSCAR =
IF (
HASONEVALUE( Meses[Mes] );
VALUES( Meses[Mes] );
"ERROR"
)
Columna1 =
CALCULATE(
COUNTROWS( Facts );
FILTER(
Facts;
Facts[F.INI_PARTIDA]=[VALOR_A_BUSCAR]
)
)
Columna2 =
CALCULATE(
COUNTROWS( Facts );
FILTER(
Facts;
Facts[F.FIN_PARTIDA]=[VALOR_A_BUSCAR]
)
)
tell me if it's useful
With a isolated table for months, yo can do something like this:
VALOR_A_BUSCAR =
IF (
HASONEVALUE( Meses[Mes] );
VALUES( Meses[Mes] );
"ERROR"
)
Columna1 =
CALCULATE(
COUNTROWS( Facts );
FILTER(
Facts;
Facts[F.INI_PARTIDA]=[VALOR_A_BUSCAR]
)
)
Columna2 =
CALCULATE(
COUNTROWS( Facts );
FILTER(
Facts;
Facts[F.FIN_PARTIDA]=[VALOR_A_BUSCAR]
)
)
tell me if it's useful
Perfect.
Thank you very much.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |